// Numbas version: exam_results_page_options {"navigation": {"onleave": {"action": "none", "message": ""}, "preventleave": true, "allowregen": true, "showfrontpage": true, "browse": true, "reverse": true, "showresultspage": "never"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 0, "name": "", "questions": [{"name": "Stephanie's copy of BS4.3", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Stephanie Greaves", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/340/"}], "functions": {}, "ungrouped_variables": ["claim", "pval", "evi1", "crit", "tval1", "things", "stand", "tol", "test", "pm", "correctc", "resultis", "fac", "confl", "evi", "this", "dothis", "m", "dmm", "n", "mm", "thisamount", "tval"], "tags": ["Probability", "accept null hypothesis", "alternative hypothesis", "critical value", "decision", "degree of freedom", "diagram", "evidence", "hypothesis testing", "null hypothesis", "p value", "population variance", "probability", "random sample", "reject null hypothesis", "sample mean", "sample standard deviation", "sampling", "sc", "statistics", "t tables", "t test", "test statistic", "two-tailed test"], "advice": "

a)

\n
Step 1: Null Hypothesis
\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;\\var{thisamount}$

\n
Step 2: Alternative Hypothesis
\n

$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;\\var{thisamount}$

\n

b)

\n

We should use the $t$ statistic as the population variance is unknown.

\n

The test statistic:

\n

\\[t =\\frac{ |\\var{m} -\\var{thisamount}|} {\\sqrt{\\frac{\\var{stand} ^ 2 }{\\var{n}}}} = \\var{tval}\\]

\n

to 3 decimal places.

\n

c)

\n

As  $n=\\var{n}$ we use the $t_{\\var{n-1}}$ tables.  We have the following data from the tables:

\n

{table([['Critical Value',crit[0],crit[1],crit[2]]],['p value','10%','5%','1%'])}

\n

We see that the $p$ value {pm[pval]}.

\n

d)

\n

Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.

\n

{Correctc}

", "rulesets": {}, "parts": [{"prompt": "\n

Step 1: Null Hypothesis

\n

$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;: \\; \\mu \\neq\\;$[[1]]

\n ", "marks": 0, "gaps": [{"allowFractions": false, "scripts": {}, "maxValue": "thisamount", "minValue": "thisamount", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "thisamount", "minValue": "thisamount", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Step 3: Test statistic

\n

Should we use the $z$ or $t$ test statistic? [[0]] (enter $z$ or $t$)

\n

Now calculate the test statistic = [[1]] (to 3 decimal places)

", "marks": 0, "gaps": [{"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "answer": "t", "checkingtype": "absdiff", "checkvariablenames": false, "vsetrange": [0, 1]}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "scripts": {}, "precision": "3", "maxValue": "tval+tol", "minValue": "tval-tol", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\n

Step 4: p-value

\n

Use tables to find a range for your $p$-value. 

\n

Choose the correct range here for $p$ : [[0]]

\n ", "marks": 0, "gaps": [{"distractors": ["", "", "", ""], "matrix": "mm", "shuffleChoices": false, "scripts": {}, "choices": ["{pm[0]}", "{pm[1]}", "{pm[2]}", "{pm[3]}"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\n

Step 5: Conclusion

\n

 

\n

Given the $p$ - value and the range you have found, what is the strength of evidence against the null hypothesis?

\n

[[0]]

\n

Your Decision:

\n

[[1]]

\n

 

\n

Conclusion:

\n

[[2]]

\n ", "marks": 0, "gaps": [{"distractors": ["", "", "", ""], "matrix": "mm", "shuffleChoices": false, "scripts": {}, "choices": ["{evi[0]}", "{evi[1]}", "{evi[2]}", "{evi[3]}"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}, {"distractors": ["", ""], "matrix": "dmm", "shuffleChoices": false, "scripts": {}, "choices": ["Retain", "Reject"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}, {"distractors": ["", ""], "matrix": [1, 0], "shuffleChoices": true, "scripts": {}, "choices": ["{Correctc}", "{Fac}"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

{this}

\n

{claim}

\n

{test}

\n

A sample of $\\var {n}$ {things}

\n

{resultis} £$\\var {m}$ with a standard deviation of £$\\var{stand}$.

\n

Perform an appropriate hypothesis test to see if the claim made by the Royal medical group is substantiated (use a two-tailed test).

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"claim": {"definition": "\"The average cost of a treatment of benzodiazepines with us is just \u00a3\" + {thisamount} + \" (including all taxes and charges!)\"", "templateType": "anything", "group": "Ungrouped variables", "name": "claim", "description": ""}, "pval": {"definition": "switch(tval1,\"There is sufficient evidence against the claim of the Royal medical group.\",\"There is insufficient evidence against the claim of the Royal medical group.\")", "templateType": "anything", "group": "Ungrouped variables", "name": "correctc", "description": ""}, "resultis": {"definition": "\"The mean cost of treatment from this sample is \"", "templateType": "anything", "group": "Ungrouped variables", "name": "resultis", "description": ""}, "fac": {"definition": "if(pval<2,\"There is sufficient evidence against the claim of the Royal medical group\",\"There is insufficient evidence against the claim of the Royal medical group.\")", "templateType": "anything", "group": "Ungrouped variables", "name": "fac", "description": ""}, "confl": {"definition": "random(90,95,99)", "templateType": "anything", "group": "Ungrouped variables", "name": "confl", "description": ""}, "evi": {"definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "templateType": "anything", "group": "Ungrouped variables", "name": "evi", "description": ""}, "this": {"definition": "\"The Royal medical group makes the following claim:\"", "templateType": "anything", "group": "Ungrouped variables", "name": "this", "description": ""}, "dothis": {"definition": "switch(pval <2, 'retain','reject')", "templateType": "anything", "group": "Ungrouped variables", "name": "dothis", "description": ""}, "m": {"definition": "thisamount+random(1..15)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "dmm": {"definition": "if(pval<2,[1,0],[0,1])", "templateType": "anything", "group": "Ungrouped variables", "name": "dmm", "description": ""}, "n": {"definition": "random(10..30)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "mm": {"definition": "switch(pval=0,[1,0,0,0],pval=1,[0,1,0,0],pval=2,[0,0,1,0],[0,0,0,1])", "templateType": "anything", "group": "Ungrouped variables", "name": "mm", "description": ""}, "thisamount": {"definition": "random(70..90)", "templateType": "anything", "group": "Ungrouped variables", "name": "thisamount", "description": ""}, "tval": {"definition": "precround(tval1,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "tval", "description": ""}}, "metadata": {"notes": "\n \t\t

2/01/2012:

\n \t\t

Added tag sc as has string variables in order to generate other scenarios.

\n \t\t

The jstat function studenttinv(critvalue,n-1) gives the critical p values correctly.

\n \t\t

Added tag diagram as the i-assess question advice has a nice graphic of the p-value and the appropriate decision.

\n \t\t", "description": "

Provided with information on a sample with sample mean and standard deviation, but no information on the population variance, use the t test to either accept or reject a given null hypothesis.

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Stephanie's EDITED BS4.5 Psychology", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stephanie Greaves", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/340/"}], "functions": {}, "ungrouped_variables": ["confl", "correctc", "crit", "dmm", "dothis", "evi", "evi1", "fac", "m", "m1", "mm", "n", "n1", "n2", "pm", "psd", "pval", "sd", "sd1", "that", "things", "things1", "this", "tol", "tpsd", "tval", "tval1", "units"], "tags": ["accept null hypothesis", "alternative hypothesis", "comparing means", "degree of freedom", "diagram", "hypothesis testing", "null hypothesis", "p values", "pooled standard deviation", "population variance", "random sample", "reject null hypothesis", "sample mean", "sampling", "sc", "statistics", "t tables", "t test", "test statistic", "two-tailed test"], "advice": "

b)

\n
Step 3 : Test statistic
\n

We should use the $t$ statistic as the population variance is unknown.

\n

The pooled standard deviation  is given by :

\n

\\[s = \\sqrt{\\frac{\\var{n1 -1} \\times \\var{sd} ^ 2 + \\var{n2 -1} \\times \\var{sd1} ^ 2 }{\\var{n1} + \\var{n2} -2}} = \\var{tpsd} = \\var{psd}\\] to 3 decimal places.

\n

The test statistic is given by \\[t = \\frac{|\\var{m} -\\var{m1}|}{s \\sqrt{\\frac{1}{ \\var{n1} }+\\frac{1}{ \\var{n2}}}} = \\var{tval}\\] to 3 decimal places.

\n

(Using $s=\\var{tpsd}$ in this formula. )

\n

c)

\n
Step 4: p value range.
\n

As  the degree of freedom is $\\var{n1}+\\var{n2}-2=\\var{n-1}$ we use the $t_{\\var{n-1}}$ tables.  We have the following data from the tables:

\n

{table([['Critical Value',crit[0],crit[1],crit[2]]],['p value','10%','5%','1%'])}

\n

We see that the $p$ value {pm[pval]}.

\n

d)

\n
Step 5: Conclusion
\n

Hence there is {evi1[pval]} evidence against $\\operatorname{H}_0$ and so we {dothis} $\\operatorname{H}_0$.

\n

{Correctc}.

", "rulesets": {}, "parts": [{"prompt": "\n

Step 1: Null hypothesis

\n

If $\\mu_M$ is the mean for time spent by {things} and  $\\mu_F$ is the mean for time spent by {things1} then you are given that:

\n

$\\operatorname{H}_0\\;:\\;\\mu_M=\\mu_F$. 

\n

Step 2: Alternative Hypothesis

\n

$\\operatorname{H}_1\\;:\\;\\mu_M \\neq \\mu_F$. 

\n

 

\n ", "type": "information", "marks": 0, "showCorrectAnswer": true, "scripts": {}}, {"prompt": "

Step 3: Test statistic

\n

Should we use the $z$ or $t$ test statistic? 

\n

[[0]]

\n

Now calculate the pooled standard deviation: [[1]] (to 3 decimal places)

\n

Now calculate the test statistic:  [[2]]  (to 3 decimal places)

\n

(Note that in this calculation you should use a value for the pooled standard deviation which is accurate to at least 5 decimal places and not the value you found to 3 decimal places above).

", "marks": 0, "gaps": [{"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "answer": "t", "checkingtype": "absdiff", "checkvariablenames": false, "vsetrange": [0, 1]}, {"allowFractions": false, "scripts": {}, "maxValue": "psd+tol", "minValue": "psd-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "tval+tol", "minValue": "tval-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Step 4:  p-value range

\n

Use tables to find a range for your $p$ -value. 

\n

Choose the correct range here for $p$ : [[0]] 

", "marks": 0, "gaps": [{"distractors": ["", "", "", ""], "matrix": "mm", "shuffleChoices": false, "scripts": {}, "choices": ["{pm[0]}", "{pm[1]}", "{pm[2]}", "{pm[3]}"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

 Given the $p$ - value and the range you have found, what is the strength of evidence against the null hypothesis?

\n

[[0]]

\n

Your Decision:

\n

[[1]]

\n

Conclusion:

\n

[[2]]

", "marks": 0, "gaps": [{"distractors": ["", "", "", ""], "matrix": "mm", "shuffleChoices": false, "scripts": {}, "choices": ["{evi[0]}", "{evi[1]}", "{evi[2]}", "{evi[3]}"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}, {"distractors": ["", ""], "matrix": "dmm", "shuffleChoices": false, "scripts": {}, "choices": ["Retain", "Reject"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}, {"distractors": ["", ""], "matrix": [1, 0], "shuffleChoices": true, "scripts": {}, "choices": ["{Correctc}", "{Fac}"], "displayType": "radiogroup", "showCorrectAnswer": true, "minMarks": 0, "marks": 0, "displayColumns": 0, "type": "1_n_2", "maxMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

{this}

\n

A random sample of $\\var{n1}$ {things} and $\\var{n2}$ {things1} gave the following results in {units}.

\n

{table([[capitalise(things),{m},{sd}],[capitalise(things1),{m1},{sd1}]],[' ','Mean','Standard deviation'])}

\n

Perform an appropriate hypothesis test to see if there is any difference in {that} between {things} and {things1} (the null and alternative hypotheses have been set out for you).

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"sd1": {"definition": "random(65..90)", "templateType": "anything", "group": "Ungrouped variables", "name": "sd1", "description": ""}, "pval": {"definition": "switch(tval1,\n \"There is evidence to suggest that average call times for \"+things+\" and \"+things1+\" differ\",\n \"There is insufficent evidence to suggest that average call times for \"+things+\" and \"+things1+\" differ\"\n)", "templateType": "anything", "group": "Ungrouped variables", "name": "correctc", "description": ""}, "tval1": {"definition": "abs(m-m1)*sqrt(n1*n2)/(tpsd*sqrt(n1+n2))", "templateType": "anything", "group": "Ungrouped variables", "name": "tval1", "description": ""}, "things": {"definition": "\"cat lovers\"", "templateType": "string", "group": "Ungrouped variables", "name": "things", "description": ""}, "m1": {"definition": "random(280..400#10)", "templateType": "anything", "group": "Ungrouped variables", "name": "m1", "description": ""}, "tol": {"definition": "0.001", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}, "units": {"definition": "\"seconds\"", "templateType": "anything", "group": "Ungrouped variables", "name": "units", "description": ""}, "pm": {"definition": "[\"is greater than 10%\",\"lies between 5% and 10%\",\"lies between 1% and 5%\",\"is less than 1%\"]", "templateType": "anything", "group": "Ungrouped variables", "name": "pm", "description": ""}, "tpsd": {"definition": "sqrt(((n1-1)*sd^2+(n2-1)*sd1^2)/(n-1))", "templateType": "anything", "group": "Ungrouped variables", "name": "tpsd", "description": ""}, "that": {"definition": "\"the average time spent on the telephone \"", "templateType": "anything", "group": "Ungrouped variables", "name": "that", "description": ""}, "psd": {"definition": "precround(tpsd,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "psd", "description": ""}, "fac": {"definition": "if(pval<2,\n \"There is evidence to suggest that average call times for \"+things+\" and \"+things1+\" differ\",\n \"There is insufficent evidence to suggest that average call times for \"+things+\" and \"+things1+\" differ\"\n)", "templateType": "anything", "group": "Ungrouped variables", "name": "fac", "description": ""}, "confl": {"definition": "[90,95,99]", "templateType": "anything", "group": "Ungrouped variables", "name": "confl", "description": ""}, "evi": {"definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "templateType": "anything", "group": "Ungrouped variables", "name": "evi", "description": ""}, "mm": {"definition": "switch(pval=0,[1,0,0,0],pval=1,[0,1,0,0],pval=2,[0,0,1,0],[0,0,0,1])", "templateType": "anything", "group": "Ungrouped variables", "name": "mm", "description": ""}, "dothis": {"definition": "switch(pval <2, 'retain','reject')", "templateType": "anything", "group": "Ungrouped variables", "name": "dothis", "description": ""}, "m": {"definition": "random(220..380#10)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "dmm": {"definition": "if(pval<2,[1,0],[0,1])", "templateType": "anything", "group": "Ungrouped variables", "name": "dmm", "description": ""}, "n": {"definition": "n1+n2-1", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "this": {"definition": "\"A phone company wants to know if there is any difference between the average time spent on the telephone, between {things} and {things1}.\"", "templateType": "anything", "group": "Ungrouped variables", "name": "this", "description": ""}, "tval": {"definition": "precround(tval1,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "tval", "description": ""}, "n1": {"definition": "random(5..15)", "templateType": "anything", "group": "Ungrouped variables", "name": "n1", "description": ""}, "n2": {"definition": "random(20..30)-n1", "templateType": "anything", "group": "Ungrouped variables", "name": "n2", "description": ""}, "things1": {"definition": "\"dog lovers\"", "templateType": "string", "group": "Ungrouped variables", "name": "things1", "description": ""}, "sd": {"definition": "random(55..85)", "templateType": "anything", "group": "Ungrouped variables", "name": "sd", "description": ""}}, "metadata": {"notes": "\n \t\t

3/01/2012:

\n \t\t

Added tag sc as can be changed to other applications. Perhaps the tables used should be improved.

\n \t\t

Missing a diagram from the original iassess question, hence tag diagram added.

\n \t\t", "description": "

Given two sets of data, sample mean and sample standard deviation, on performance on the same task, make a decision as to whether or not the mean times differ. Population variance not given, so the t test has to be used in conjunction with the pooled sample standard deviation.

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Stephanie's EDITED copy of BS4.1 Psychology", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Stephanie Greaves", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/340/"}], "functions": {}, "ungrouped_variables": ["uci", "tuci", "dothis", "invt", "m", "n", "p", "s", "tlci", "t", "units", "lci", "confl", "sc", "spec", "tinvt", "sd"], "tags": ["confidence interval for the mean", "confidence intervals", "mean", "sample", "sampling", "sc", "standard deviation", "statistics", "student t test", "t tables", "t test"], "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

The population variance is unknown. So we have to use the $t$ tables to find the confidence interval. 

\n

b)

\n

We now calculate the $\\var{confl}$% confidence interval:

\n

As we have $\\var{n}-1=\\var{n-1}$ degrees of freedom, the interval is given by:

\n

\\[ \\var{m[s]} \\pm t_{\\var{n-1}}\\sqrt{\\frac{\\var{sd[s]}^2}{\\var{n}}}\\]

\n

Looking up the t tables for  $\\var{confl}$% we see that $t_{\\var{n-1}}=\\var{invt}$ to 3 decimal places.

\n

Hence:

\n

Lower value of the confidence interval $=\\;\\displaystyle \\var{m[s]} -\\var{invt} \\sqrt{\\frac{\\var{sd[s]} ^ 2} {\\var{n}}} = \\var{p}\\var{lci}${units} to 2 decimal places.

\n

Upper value of the confidence interval $=\\;\\displaystyle \\var{m[s]} +\\var{invt} \\sqrt{\\frac{\\var{sd[s]} ^ 2} {\\var{n}}} = \\var{p}\\var{uci}${units} to 2 decimal places.

\n

 

", "rulesets": {}, "parts": [{"prompt": "

Is the population variance known or unknown? 

\n

[[0]]

", "marks": 0, "gaps": [{"displayColumns": 0, "matrix": [0, 1], "shuffleChoices": true, "maxMarks": 0, "distractors": ["", ""], "choices": ["Known", "Unknown"], "displayType": "radiogroup", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "minMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Calculate a $\\var{confl}$% confidence interval $(a,b)$ for the population mean:

\n

$a=$ [[0]]{units}

\n

$b=$ [[1]]{units}

\n

Enter both to 2 decimal places.

\n

 

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "marks": 1, "precision": "2", "maxValue": "lci+0.01", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "minValue": "lci-0.01", "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "marks": 1, "precision": "2", "maxValue": "uci+0.01", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "minValue": "uci-0.01", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

The Newcastle Psychology department wants to {dothis[s]}.

\n

A random sample of {spec} $\\var{n}$ {t[s]} gave a mean and standard deviation of {p} $\\var{m[s]}$ and {p} $\\var{sd[s]}$ respectively.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"tinvt": {"definition": "studenttinv((confl+100)/200,n-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "tinvt", "description": ""}, "tuci": {"definition": "m[s]+invt*sqrt(sd[s]^2/n)", "templateType": "anything", "group": "Ungrouped variables", "name": "tuci", "description": ""}, "dothis": {"definition": "\n [\"estimate the mean amount of items on a tray students could memorize in 30 seconds\",\n \"estimate the mean IQ scores from students at Newcastle University\",\n \"estimate the mean hours worked per week by new graduates\"\n ]\n \n \n \n ", "templateType": "anything", "group": "Ungrouped variables", "name": "dothis", "description": ""}, "invt": {"definition": "precround(tinvt,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "invt", "description": ""}, "m": {"definition": "\n [random(15..35#001),\n random(100..120#001),\n random(34..48#0.5),\n random(100..300#0.5),\n random(10..20#0.5),\n random(3.5..6#0.5)]\n \n ", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "n": {"definition": "random(10..30)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "p": {"definition": "switch(s=0 or s=1 or s=3,'',' ')", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "s": {"definition": "random(0..abs(sc)-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "tlci": {"definition": "m[s]-invt*sqrt(sd[s]^2/n)", "templateType": "anything", "group": "Ungrouped variables", "name": "tlci", "description": ""}, "t": {"definition": "\n [\" students \",\n \" mathematics students \",\n \" workers\"\n ]\n \n ", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "sd": {"definition": "\n [random(1..5#0.10),\n random(10..15#5),\n random(2..5#0.5),\n random(10..40#0.5),\n random(1..3#0.5),\n random(0.5..1#0.1)]\n ", "templateType": "anything", "group": "Ungrouped variables", "name": "sd", "description": ""}, "units": {"definition": "switch(s=2,\"hours\",s=4,\"\",s=5,\"\",\" \")", "templateType": "anything", "group": "Ungrouped variables", "name": "units", "description": ""}, "confl": {"definition": "random(90,95,99)", "templateType": "anything", "group": "Ungrouped variables", "name": "confl", "description": ""}, "sc": {"definition": "\n [ \" a third year mathematics class\",\n \" students \",\n \"store assistants\"]\n ", "templateType": "anything", "group": "Ungrouped variables", "name": "sc", "description": ""}, "spec": {"definition": "if(s=2,\"the timecards of \", \" \")", "templateType": "anything", "group": "Ungrouped variables", "name": "spec", "description": ""}, "uci": {"definition": "precround(tuci,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "uci", "description": ""}, "lci": {"definition": "precround(tlci,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "lci", "description": ""}}, "metadata": {"notes": "

1/01/2013:

\n

Uses the statistical extension which includes the necessary t statistic functions. There are string variables giving various scenarios and these can be added to by the author - except has to add values to arrays m and sd etc as well. Added tag sc.

\n

6/01/2013:

\n

Improved display of units.

", "description": "\n \t\t

Finding the confidence interval at either 90%, 95% or 99% for the mean given the mean and standard deviation of a sample. The population variance is not given and so the t test has to be used. Various scenarios are included.

\n \t\t

 

\n \t\t", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "pickQuestions": 0, "type": "exam", "shuffleQuestions": false, "percentPass": 0, "feedback": {"advicethreshold": 0, "showtotalmark": true, "showactualmark": true, "showanswerstate": true, "allowrevealanswer": true}, "allQuestions": true, "duration": 0, "name": "Harry's copy of Parametric hypothesis testing", "questions": [], "showQuestionGroupNames": false, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "notes": "", "description": "

Three questions on parametric hypothesis testing and confidence intervals, aimed at psychology students.

"}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Lauren Frances Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2490/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}