// Numbas version: exam_results_page_options {"name": "Z-test on sample proportion", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "statement": "

A recent poll of \$$\\var{n1}\$$ people indicated that \$$\\var{prop1}\$$ of them had delayed seeking healthcare treatment due to the associated cost.

\n

It has long been believed that \$$\\var{percentage}\$$% of people will delay seeking healthcare treatment due to the associated cost.

\n

Does the data support this theory?

\n

", "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": ["stats"], "advice": "

\n

\$$H_0:\$$  p =\$$\\simplify{{percentage}/100}\$$.

\n

\$$H_1:\$$ p \$$\\ne \\simplify{{percentage}/100}\$$.

\n

Given a sample of size \$$n\$$ recall:

\n

the formula for the sample proportion:      \$$\\overline{p}=\\frac{{x}}{n}\$$ where \$$x\$$ is the number of observations

\n

\$$\\overline{p}=\\frac{\\var{prop1}}{\\var{n1}}=\\var{p}\$$

\n

the formula for the Z-statistic:     \$$Z=\\frac{\\overline{p}-p}{\\sqrt{\\frac{p(1-p)}{n}}}\$$

\n

\$$Z=\\frac{\\var{p}-\\var{pop_p}}{\\sqrt{\\frac{\\var{pop_p}(1-\\var{pop_p})}{\\var{n1}}}}\$$

\n

\$$Z=\\frac{\\simplify{{p}-{pop_p}}}{\\sqrt{\\simplify{{pop_p}*(1-{pop_p})/{n1}}}}=\\var{test_statistic}\$$

\n

\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.

", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "variables": {"percentage": {"description": "", "definition": "round(0.85*p*100)", "name": "percentage", "group": "Ungrouped variables", "templateType": "anything"}, "p": {"description": "", "definition": "precround({prop1}/{n1},2)", "name": "p", "group": "Ungrouped variables", "templateType": "anything"}, "n1": {"description": "", "definition": "random(360..450#10)", "name": "n1", "group": "Ungrouped variables", "templateType": "randrange"}, "Z99": {"description": "", "definition": "2.58", "name": "Z99", "group": "Ungrouped variables", "templateType": "number"}, "pop_p": {"description": "

pop_p

", "definition": "precround({percentage}/100,2)", "name": "pop_p", "group": "Ungrouped variables", "templateType": "anything"}, "prop1": {"description": "", "definition": "random(100..125#1)", "name": "prop1", "group": "Ungrouped variables", "templateType": "randrange"}, "scenario": {"description": "", "definition": "sum(map(abs(test_statistic)Enter the value of the sample proportion: \$$p=\$$ [[1]]

\n

Enter the value for the appropriate test statistic: Z = [[0]]

\n

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.

", "displayColumns": "1", "minMarks": "2", "variableReplacementStrategy": "originalfirst", "matrix": "decision_matrix", "marks": 0, "displayType": "radiogroup", "shuffleChoices": false, "choices": ["

Reject the Null Hypothesis and conclude conclude that the proportion of people who will delay seeking healthcare treatment due to the associated cost is not given by \$$p=\\frac{\\var{percentage}}{100}\$$.

", "

Reject the Null Hypothesis at the 5% significance level but accept the Null Hypothesis at the 1% significance level and conclude that the proportion of people who will delay seeking healthcare treatment due to the associated cost is given by \$$p=\\frac{\\var{percentage}}{100}\$$.

", "

Reject the Null Hypothesis at the 10% significance level but accept the Null Hypothesis at the 5% significance level and conclude that the proportion of people who will delay seeking healthcare treatment due to the associated cost is given by \$$p=\\frac{\\var{percentage}}{100}\$$.

", "

Accept the Null Hypothesis at the 10% significance level and conclude that the proportion of people who will delay seeking healthcare treatment due to the associated cost is given by \$$p=\\frac{\\var{percentage}}{100}\$$.

"], "showCorrectAnswer": true, "variableReplacements": [{"must_go_first": false, "part": "p0g0", "variable": "test_statistic"}], "showFeedbackIcon": true}], "name": "Z-test on sample proportion", "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}