// Numbas version: exam_results_page_options {"name": "Resting heart rate statistics", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

In this example we have a single sample of 30 data values. The sample is just large enough to apply a Z-test

\n

\\(H_0:\\) The mean \\(=\\simplify{{mu1}-{k}}\\).

\n

\\(H_1:\\) The mean \\(\\ne \\simplify{{mu1}-{k}}\\).

\n

Given a sample of size \\(n\\) recall:

\n

the formula for the sample mean:    \\(\\overline{x}=\\frac{\\sum {x}}{n}=\\var{sample_mean_2}\\)

\n

the formula for the sample standard deviation:   \\(s=\\sqrt{\\frac{\\sum{(x-\\overline{x})^2}}{n-1}}=\\var{sample_stdev_2}\\)

\n

the formula for the Z-statistic:   \\(Z=\\frac{\\overline{x}-\\mu}{\\frac{s}{\\sqrt{n}}}=\\frac{\\var{sample_mean_2}-\\simplify{{mu1}-{k}}}{\\frac{\\var{sample_stdev_2}}{\\sqrt{\\var{sample_size}}}}=\\var{test_statistic}\\)

\n

The Z-table values will be for a two-tailed test are given below. 

\n

significance              10%                    5%                   1%

\n

      limits                \\(\\pm1.65\\)             \\(\\pm1.96\\)             \\(\\pm2.58\\)

\n

Compare the test statistic with the Z-table values and choose your conclusion.

", "rulesets": {}, "variable_groups": [], "functions": {}, "ungrouped_variables": ["sample_size", "r1", "decision_matrix", "sample_mean_2", "sample_stdev_2", "mu1", "scenario", "sigm1", "t95", "t99", "k", "t90", "test_statistic"], "tags": [], "extensions": ["stats"], "name": "Resting heart rate statistics", "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": ""}, "statement": "

The resting heart rate of 30 Irish women, selected at random, were measured and recorded in beats per minute.  The data collected is presented below.

\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
{r1[0]}{r1[1]}{r1[2]}{r1[3]}{r1[4]}{r1[5]}{r1[6]}{r1[7]}{r1[8]}{r1[9]}{r1[10]}{r1[11]}{r1[12]}{r1[13]}{r1[14]}
{r1[15]}{r1[16]}{r1[17]}{r1[18]}{r1[19]}{r1[20]}{r1[21]}{r1[22]}{r1[23]}{r1[24]}{r1[25]}{r1[26]}{r1[27]}{r1[28]}{r1[29]}
\n

It is believed that the mean heart rate for Irish women is \\(\\simplify{{mu1}-{k}}\\) beats per minute.

\n

Does the data support this theory? 

\n

", "preamble": {"css": "", "js": ""}, "variables": {"k": {"templateType": "randrange", "name": "k", "description": "", "group": "Ungrouped variables", "definition": "random(1..2.5#0.25)"}, "sample_stdev_2": {"templateType": "anything", "name": "sample_stdev_2", "description": "", "group": "Ungrouped variables", "definition": "precround(sqrt(30*stdev(r1)^2/29),2)"}, "r1": {"templateType": "anything", "name": "r1", "description": "", "group": "Ungrouped variables", "definition": "repeat(round(normalsample(mu1,sigm1)),sample_size)"}, "t95": {"templateType": "number", "name": "t95", "description": "", "group": "Ungrouped variables", "definition": "1.96"}, "scenario": {"templateType": "anything", "name": "scenario", "description": "", "group": "Ungrouped variables", "definition": "sum(map(abs(test_statistic)Give all your answers correct to two decimal places.

\n

Input the sample mean:   \\(\\bar{x}=\\) [[0]]

\n

Input the sample standard deviation:   \\(s=\\) [[1]]

\n

Enter the value for the test statistic:   \\(Z=\\) [[2]]

\n

", "variableReplacements": [], "customMarkingAlgorithm": "", "sortAnswers": false}, {"maxMarks": "2", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "type": "1_n_2", "matrix": "decision_matrix", "shuffleChoices": false, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "marks": 0, "displayColumns": "1", "variableReplacementStrategy": "originalfirst", "prompt": "

Having compared your test statistic with the table values for a two-tailed Z-test, select one of the following conclusions that best describes your conclusion.

", "displayType": "radiogroup", "variableReplacements": [{"part": "p0g2", "variable": "test_statistic", "must_go_first": false}], "minMarks": "2", "choices": ["

Reject the Null Hypothesis and conclude that mean resting heart rate for an Irish woman is not \\(\\simplify{{mu1}-{k}}\\) beats per minute.

", "

Reject the Null Hypothesis at the 5% significance level but accept the Null Hypothesis at the 1% significance level and conclude that mean resting heart rate for an Irish woman is \\(\\simplify{{mu1}-{k}}\\) beats per minute.

", "

Reject the Null Hypothesis at the 10% significance level but accept the Null Hypothesis at the 5% significance level and conclude that mean resting heart rate for an Irish woman is \\(\\simplify{{mu1}-{k}}\\) beats per minute.

", "

Accept the Null Hypothesis at the 10% significance level and conclude that mean resting heart rate for an Irish woman is \\(\\simplify{{mu1}-{k}}\\) beats per minute.

"], "customMarkingAlgorithm": ""}], "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "David Goulding", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2365/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "David Goulding", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2365/"}]}