// Numbas version: finer_feedback_settings {"name": "SM10 Estimated Mean", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "SM10 Estimated Mean", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Tina needs to take a train to work.

\n

The table below shows information about how long the train is delayed for on each day.

\n

The policy of the train company is that if your train is delayed for longer than 30 minutes, you will recieve a 50% discount on your train ticket.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Delay TimeFrequency 
0 < t $\\leq$ 10{f1}
10 < t $\\leq$ 20{f2}
20 < t $\\leq$ 30{f3}
30 < t $\\leq$ 40{f4}
40 < t $\\leq$ 50{f5}
", "advice": "

a)

\n

To find the estimated mean we must work out the midpoint of the delay time intervals and multiply this by the frequency to create the $fx$ column on the table.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Delay TimeFrequency MidpointFrequency $\\times$ Midpoint, $fx$
0 < t $\\leq$ 10{f1}5= 5$\\times\\var{f1} = \\var{f1m}$
10 < t $\\leq$ 20{f2}15= 15$\\times\\var{f2} = \\var{f2m}$
20 < t $\\leq$ 30{f3}25= 25$\\times\\var{f3} = \\var{f3m}$
30 < t $\\leq$ 40{f4}35= 35$\\times\\var{f4} = \\var{f4m}$
40 < t $\\leq$ 50{f5}45= 45$\\times\\var{f5} = \\var{f5m}$
\n

Now to find the mean we calculate the sum of the $fx$ column and divide it by the sum of the frequencies:

\n

Estimated Mean = $\\frac{\\var{f1m}+\\var{f2m}+\\var{f3m}+\\var{f4m}+\\var{f5m}}{5+15+25+35+45} = \\frac{\\var{freqmid}}{\\var{sum}} = \\var{meana}.$

\n

Hence the estimated mean delay time is $\\var{mean}$ to two decimal places.

\n

\n

b)

\n

To work out what percentage of delays that were over 30 minutes we first need to calculate the number of days where the train was delayed for over 30 minutes. 

\n

The number of delays that over 30 minutes is $\\var{f4}+\\var{f5} = \\var{f4+f5}$.

\n

We divide this by the total number of deliveries to find the fraction of delays that were over 30 minutes and then multiply this number by 100 to find the percentage:

\n

$\\frac{\\var{f4+f5}}{\\var{f1}+\\var{f2}+\\var{f3}+\\var{f4}+\\var{f5}} \\times 100\\% = \\frac{\\var{f4+f5}}{\\var{sum}} \\times 100\\% = \\var{percentagea} \\times 100\\%$.

\n

Hence, the percentage of delays that were over 30 minutes is $\\var{percentage}\\%$ to two decimal places.

\n

\n

c)

\n

The percentage of delays that take over 40 minutes is:

\n

$\\frac{\\var{f5}}{\\var{f1}+\\var{f2}+\\var{f3}+\\var{f4}+\\var{f5}} \\times 100\\% = \\frac{\\var{f5}}{\\var{sum}} \\times 100\\% = \\var{percent40} \\times 100\\%$, to one decimal place.

\n

So, only $\\var{percent40}\\%$ of the time, delays were longer than 40 minutes so the manager would probably wanto the policy changed to 40 minutes.

\n

\n

Use this link to find some resources which will help you revise this topic.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"f1": {"name": "f1", "group": "Ungrouped variables", "definition": "random(1 .. 20#1)", "description": "

Frequency 1

", "templateType": "randrange", "can_override": false}, "f2": {"name": "f2", "group": "Ungrouped variables", "definition": "random(1 .. 20#1)", "description": "

Frequency 2

", "templateType": "randrange", "can_override": false}, "f3": {"name": "f3", "group": "Ungrouped variables", "definition": "random(1 .. 20#1)", "description": "

Frequency 3

", "templateType": "randrange", "can_override": false}, "f4": {"name": "f4", "group": "Ungrouped variables", "definition": "random(1 .. 20#1)", "description": "

Frequency 4

", "templateType": "randrange", "can_override": false}, "f5": {"name": "f5", "group": "Ungrouped variables", "definition": "random(1 .. 5#1)", "description": "

Frequency 5

", "templateType": "randrange", "can_override": false}, "meana": {"name": "meana", "group": "Ungrouped variables", "definition": "freqmid/sum", "description": "

Mean

", "templateType": "anything", "can_override": false}, "sum": {"name": "sum", "group": "Ungrouped variables", "definition": "f1+f2+f3+f4+f5", "description": "

Sum of frequencies

", "templateType": "anything", "can_override": false}, "f1m": {"name": "f1m", "group": "Ungrouped variables", "definition": "5*f1", "description": "

Frequency * midpoint 1

", "templateType": "anything", "can_override": false}, "f2m": {"name": "f2m", "group": "Ungrouped variables", "definition": "15*f2", "description": "

Frequency * midpoint 2

", "templateType": "anything", "can_override": false}, "f3m": {"name": "f3m", "group": "Ungrouped variables", "definition": "25*f3", "description": "

Frequency * midpoint 3

", "templateType": "anything", "can_override": false}, "f4m": {"name": "f4m", "group": "Ungrouped variables", "definition": "35*f4", "description": "

Frequency * midpoint 4

", "templateType": "anything", "can_override": false}, "f5m": {"name": "f5m", "group": "Ungrouped variables", "definition": "45*f5", "description": "

Frequency * midpoint 5

", "templateType": "anything", "can_override": false}, "freqmid": {"name": "freqmid", "group": "Ungrouped variables", "definition": "f1m+f2m+f3m+f4m+f5m", "description": "

Sum of Frequency * midpoint 

", "templateType": "anything", "can_override": false}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "precround(meana,2)", "description": "

Mean rounded to two decimal places

", "templateType": "anything", "can_override": false}, "f30": {"name": "f30", "group": "Ungrouped variables", "definition": "f4+f5", "description": "

Sum of 4th & 5th frequencies

", "templateType": "anything", "can_override": false}, "percentagea": {"name": "percentagea", "group": "Ungrouped variables", "definition": "(f30/sum)*100", "description": "

Percentage over 30 mins

", "templateType": "anything", "can_override": false}, "percentage": {"name": "percentage", "group": "Ungrouped variables", "definition": "precround(percentagea,1)", "description": "

Percentage rounded to one decimal place

", "templateType": "anything", "can_override": false}, "percent40": {"name": "percent40", "group": "Ungrouped variables", "definition": "precround(((f5/sum)*100),1)", "description": "

Percentage over 40 mins

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["f1", "f2", "f3", "f4", "f5", "meana", "sum", "f1m", "f2m", "f3m", "f4m", "f5m", "freqmid", "mean", "f30", "percentagea", "percentage", "percent40"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Using a calculator, calculate an estimate for the mean delay time. Give your answer to two decimal places.

", "minValue": "mean", "maxValue": "mean", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What percentage of delays were over 30 minutes? Give your answer to one decimal place.

", "minValue": "percentage", "maxValue": "percentage", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": true, "customName": "c)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The train company propose that they should only offer the 50% discount if the train is delayed for over 40 minutes.

\n

If you were the manager of the train company would you agree? Type yes or no into the box and think about the reasons for your answer.

", "answer": "yes", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "yes", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}], "resources": []}]}], "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}