// Numbas version: exam_results_page_options {"name": "Test istotno\u015bci dla jednej \u015bredniej", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Test istotno\u015bci dla jednej \u015bredniej", "tags": [], "metadata": {"description": "

Dane s\u0105 \u015brednia i odchylenie standardowe z próby. Nale\u017cy przeprowadzi\u0107 test istotno\u015bci dla \u015bredniej i zweryfikowa\u0107 postawion\u0105 hipotez\u0119.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Znany przewo\u017anik lotniczy reklamuje, \u017ce {claim}. Aby zweryfikowa\u0107, czy jest to prawda, zapytano {n} pasa\u017cerów podró\u017cuj\u0105cych tymi liniami do Pary\u017ca o to, ile zap\u0142acili za bilet.

\n

{resultis} {m} euro z odchyleniem standardowym {stand} euro.

\n

Na poziomie istotno\u015bci 0,05 zweryfikuj odpowiedni\u0105 hipotez\u0119, aby sprawdzi\u0107, czy deklaracja przewo\u017anika w reklamie jest prawdziwa (u\u017cyj testu dwustronnego).

", "advice": "\n

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}

\n ", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.05", "description": "", "templateType": "anything", "can_override": false}, "dmm": {"name": "dmm", "group": "Ungrouped variables", "definition": "if(pval<2,[1,0],[0,1])", "description": "", "templateType": "anything", "can_override": false}, "thisamount": {"name": "thisamount", "group": "Ungrouped variables", "definition": "random(70..90)", "description": "", "templateType": "anything", "can_override": false}, "confl": {"name": "confl", "group": "Ungrouped variables", "definition": "random(90,95,99)", "description": "", "templateType": "anything", "can_override": false}, "pval": {"name": "pval", "group": "Ungrouped variables", "definition": "switch(tval1,\"There is sufficient evidence against the claim of the flight company.\",\"There is insufficient evidence against the claim of the flight company.\")", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "\"A rival flight company decides to test their claim.\"", "description": "", "templateType": "anything", "can_override": false}, "crit": {"name": "crit", "group": "Ungrouped variables", "definition": "map(precround(x,3),x,[studenttinv((90+100)/200,n-1),studenttinv((95+100)/200,n-1),studenttinv((99+100)/200,n-1)])", "description": "", "templateType": "anything", "can_override": false}, "this": {"name": "this", "group": "Ungrouped variables", "definition": "\"An online flight company makes the following claim:\"", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(35..50)", "description": "", "templateType": "anything", "can_override": false}, "tval": {"name": "tval", "group": "Ungrouped variables", "definition": "precround(tval1,2)", "description": "", "templateType": "anything", "can_override": false}, "dothis": {"name": "dothis", "group": "Ungrouped variables", "definition": "switch(pval <2, 'retain','reject')", "description": "", "templateType": "anything", "can_override": false}, "pm": {"name": "pm", "group": "Ungrouped variables", "definition": "[\"is greater than 10%\",\"lies between 5% and 10%\",\"lies between 1% and 5%\",\"is less than 1%\"]", "description": "", "templateType": "anything", "can_override": false}, "mm": {"name": "mm", "group": "Ungrouped variables", "definition": "switch(pval=0,[1,0,0,0],pval=1,[0,1,0,0],pval=2,[0,0,1,0],[0,0,0,1])", "description": "", "templateType": "anything", "can_override": false}, "here": {"name": "here", "group": "Ungrouped variables", "definition": "random(\"Barcelona\",\"Madrid\",\"Athens\",\"Berlin\",\"Palma\",\"Rome\",\"Paris\",\"Lisbon\")", "description": "", "templateType": "anything", "can_override": false}, "things": {"name": "things", "group": "Ungrouped variables", "definition": "\"customers is taken.\"", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "thisamount+random(1..15)", "description": "", "templateType": "anything", "can_override": false}, "claim": {"name": "claim", "group": "Ungrouped variables", "definition": "\"\u015aredni koszt lotu jego liniami z polskich lotnisk do Pary\u017ca wynosi \" + {thisamount} + \" euro (wliczaj\u0105c podatki i op\u0142aty)\"", "description": "", "templateType": "anything", "can_override": false}, "evi1": {"name": "evi1", "group": "Ungrouped variables", "definition": "[\"no\",\"slight\",\"moderate\",\"strong\"]", "description": "", "templateType": "anything", "can_override": false}, "tval1": {"name": "tval1", "group": "Ungrouped variables", "definition": "abs(m-thisamount)*sqrt(n)/stand", "description": "", "templateType": "anything", "can_override": false}, "fac": {"name": "fac", "group": "Ungrouped variables", "definition": "if(pval<2,\"There is sufficient evidence against the claim of the flight company\",\"There is insufficient evidence against the claim of the flight company.\")", "description": "", "templateType": "anything", "can_override": false}, "evi": {"name": "evi", "group": "Ungrouped variables", "definition": "[\"None\",\"Slight\",\"Moderate\",\"Strong\"]", "description": "", "templateType": "anything", "can_override": false}, "stand": {"name": "stand", "group": "Ungrouped variables", "definition": "random(15..25)", "description": "", "templateType": "anything", "can_override": false}, "resultis": {"name": "resultis", "group": "Ungrouped variables", "definition": "\"\u015arednia cena biletu w tej pr\u00f3bie wynios\u0142a \"", "description": "", "templateType": "anything", "can_override": false}, "tstat": {"name": "tstat", "group": "Ungrouped variables", "definition": "precround(studenttinv(0.9,n-1),3)", "description": "", "templateType": "anything", "can_override": false}, "ucrit": {"name": "ucrit", "group": "Ungrouped variables", "definition": "1.96", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["claim", "pval", "evi1", "crit", "tval1", "things", "stand", "tol", "test", "pm", "correctc", "resultis", "here", "fac", "confl", "evi", "this", "dothis", "m", "dmm", "n", "mm", "thisamount", "tval", "tstat", "ucrit"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Sformu\u0142uj hipotez\u0119 zerow\u0105 oraz alternatywn\u0105:

\n

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

\n

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

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "thisamount", "maxValue": "thisamount", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "thisamount", "maxValue": "thisamount", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Z jakiego testu skorzystasz, któr\u0105 statystyk\u0119 testow\u0105 wyznaczasz*? [[0]] (wpisz $u$ lub $t$).

\n

*Wpisz $u$, je\u017celi korzystasz z rozk\u0142adu normalnego; wpisz $t$, je\u017celi korzystasz z rozk\u0142adu t Studenta

\n

Warto\u015b\u0107 statystyki testowej = [[1]] (zaokr\u0105glij do 2 miejsc po przecinku)

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "u", "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": "u", "value": ""}]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "tval-tol", "maxValue": "tval+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Odczytaj z tablic warto\u015b\u0107 krytyczn\u0105: [[0]]

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

Porównuj\u0105c warto\u015b\u0107 statystyki testowej z warto\u015bci\u0105 krytyczn\u0105, podejmij odpowiedni\u0105 decyzj\u0119. Wpisz 1 przy odpowiedzi prawid\u0142owej oraz 0 przy odpowiedzi nieprawid\u0142owej.

\n

[[0]] Nale\u017cy odrzuci\u0107 H0

\n

[[1]] Nie ma podstaw do odrzucenia H0

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "if(tval>=ucrit or tval<=ucrit*(-1),1,0)", "maxValue": "if(tval>=ucrit or tval<=ucrit*(-1),1,0)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "if(tval>=ucrit or tval<=ucrit*(-1),0,1)", "maxValue": "if(tval>=ucrit or tval<=ucrit*(-1),0,1)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Aleksandra Romanowska", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/11231/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Aleksandra Romanowska", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/11231/"}]}