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

An experiment was designed to test whether students’ learning is affected by background sound. Twenty-four students were randomly separated into three groups of eight. All students study a passage of text for 30 minutes.

\n

Group 1 study with music playing at a constant volume in the background. Group 2 study with recorded conversations playing in the background and group 3 study with no sound at all. After studying, all students take a multiple-choice test on the material.

\n

Their scores are given 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\n\n\n\n\n\n\n\n\n\n\n
Group 1Group 2Group 3
{r1[0]}{r2[0]}{r3[0]}
{r1[1]}{r2[1]}{r3[1]}
{r1[2]}{r2[2]}{r3[2]}
{r1[3]}{r2[3]}{r3[3]}
{r1[4]}{r2[4]}{r3[4]}
{r1[5]}{r2[5]}{r3[5]}
{r1[6]}{r2[6]}{r3[6]}
{r1[7]}{r2[7]}{r3[7]}
\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

Test the hypothesis that the students' average marks are unaffected by the background sounds.

\n

", "advice": "

In this example we are comparing the means of three distict samples, we therefore must use the analysis of variance test (ANOVA)

\n

\\(H_0:\\) Students' average marks are unaffected by different background sounds.

\n

\\(H_1:\\) Students' average marks are affected by different background sounds.

\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
Group 1Group 2Group 3
\\({n_i}\\)888
\\(\\sum{x_i}\\){sum_r1}{sum_r2}{sum_r3}
\\(\\sum{x_i^2}\\){r1sqd}{r2sqd}{r3sqd}
\n

\n

We need to evaluate the sum of squares between the samples \\(S_b\\), and the sum of squares within the samples \\(S_w\\).

\n

\\(S_b=\\sum\\left(\\frac{(\\sum{x_i})^2}{n_i}\\right)-\\frac{(\\sum{x_{i,j}})^2}{n_t}\\) where \\({n_i}\\) is the number of data values in sample \\(i\\) and \\({n_t}\\) equals the total number of data values.

\n

\\(S_b=\\frac{(\\var{sum_r1})^2}{8}+\\frac{(\\var{sum_r2})^2}{8}+\\frac{(\\var{sum_r3})^2}{8}-\\frac{(\\var{total_sum_r})^2}{24}\\)

\n

\\(S_b=\\var{ss_betw}\\)

\n

\\(S_w=\\sum\\left(\\sum{x_i^2}-\\frac{(\\sum{x_i})^2}{n_i}\\right)\\)

\n

\\(S_w=\\left(\\var{r1sqd}-\\frac{(\\var{sum_r1})^2}{8}\\right)+\\left(\\var{r2sqd}-\\frac{(\\var{sum_r2})^2}{8}\\right)+\\left(\\var{r3sqd}-\\frac{(\\var{sum_r3})^2}{8}\\right)\\)

\n

\\(S_w=\\var{ss_within}\\)

\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
Sum of Squaresdeg. of freedomMean squareF
Between\\(\\var{ss_betw}\\)2\\(\\var{msb}\\)\\(\\var{test_statistic}\\)
                  Within\\(\\var{ss_within}\\)21\\(\\var{msw}\\)
\n

\n

\n

\n

\n

 

\n

The F-table values will have \\(F_{2,21}=2, 21\\) degrees of freedom.

\n

The lower cut-off point is found using \\(\\frac{1}{F_{21,2}}\\)

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Significance0.05
Lower limit0.025
Upper limit4.42
\n

\n

\n

\n

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

", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"r1sqd": {"name": "r1sqd", "group": "Ungrouped variables", "definition": "dot(r1,r1)", "description": "", "templateType": "anything", "can_override": false}, "sum_r1": {"name": "sum_r1", "group": "Ungrouped variables", "definition": "sum(r1)", "description": "", "templateType": "anything", "can_override": false}, "r3sqd": {"name": "r3sqd", "group": "Ungrouped variables", "definition": "dot(r3,r3)", "description": "", "templateType": "anything", "can_override": false}, "sum_r2": {"name": "sum_r2", "group": "Ungrouped variables", "definition": "sum(r2)", "description": "", "templateType": "anything", "can_override": false}, "r2sqd": {"name": "r2sqd", "group": "Ungrouped variables", "definition": "dot(r2,r2)", "description": "", "templateType": "anything", "can_override": false}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "vector(repeat(random(30..90),8))", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "vector(repeat(random(40..93),8))", "description": "", "templateType": "anything", "can_override": false}, "f_u": {"name": "f_u", "group": "Ungrouped variables", "definition": "3.82", "description": "", "templateType": "number", "can_override": false}, "test_statistic": {"name": "test_statistic", "group": "Ungrouped variables", "definition": "precround((ss_betw/2)/(ss_within/21),2)", "description": "", "templateType": "anything", "can_override": false}, "sum_r3": {"name": "sum_r3", "group": "Ungrouped variables", "definition": "sum(r3)", "description": "", "templateType": "anything", "can_override": false}, "msb": {"name": "msb", "group": "Ungrouped variables", "definition": "{ss_betw}/2", "description": "", "templateType": "anything", "can_override": false}, "ss_within": {"name": "ss_within", "group": "Ungrouped variables", "definition": "precround(r1sqd-sum_r1^2/8+r2sqd-sum_r2^2/8+r3sqd-sum_r3^2/8,2)", "description": "", "templateType": "anything", "can_override": false}, "total_sum_r": {"name": "total_sum_r", "group": "Ungrouped variables", "definition": "sum_r1+sum_r2+sum_r3", "description": "", "templateType": "anything", "can_override": false}, "r3": {"name": "r3", "group": "Ungrouped variables", "definition": "vector(repeat(random(45..99),8))", "description": "", "templateType": "anything", "can_override": false}, "f_l": {"name": "f_l", "group": "Ungrouped variables", "definition": "0.025", "description": "", "templateType": "anything", "can_override": false}, "ss_betw": {"name": "ss_betw", "group": "Ungrouped variables", "definition": "precround(sum_r1^2/8+sum_r2^2/8+sum_r3^2/8-total_sum_r^2/24,2)", "description": "", "templateType": "anything", "can_override": false}, "msw": {"name": "msw", "group": "Ungrouped variables", "definition": "precround({ss_within}/21,2)", "description": "", "templateType": "anything", "can_override": false}, "atvalue": {"name": "atvalue", "group": "Ungrouped variables", "definition": "abs(test_statistic)", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "if(atvalue>=f_u,[1,0,0],if(atvalue>=f_l,[0,1,0],[0,0,1]))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["f_u", "r2", "r3", "sum_r1", "sum_r3", "sum_r2", "r1", "total_sum_r", "r1sqd", "r2sqd", "r3sqd", "ss_betw", "ss_within", "test_statistic", "f_l", "msb", "msw", "atvalue", "v"], "variable_groups": [], "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": "

Fill in the appropriate values in the table below, correct to one decimal place

\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
Sum of squaresdegrees of freedommean squareF
\n

Between

\n
[[0]]2[[2]][[4]]
\n

Within

\n
[[1]]21[[3]]
\n

\n

\n

\n

\n

\n

Correct to 2 decimal places, enter the lower table statistic: F = [[5]]

\n

Correct to 2 decimal places, enter the upper table statistic: F = [[6]]

", "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": "ss_betw", "maxValue": "ss_betw", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "ss_within", "maxValue": "ss_within", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "ss_betw/2", "maxValue": "ss_betw/2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "ss_within/21", "maxValue": "ss_within/21", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "(ss_betw/2)/(ss_within/21)", "maxValue": "(ss_betw/2)/(ss_within/21)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "0.03", "maxValue": "0.03", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "4.42", "maxValue": "4.42", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "", "part": "p0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Having compared your test statistic with the upper and lower table values for a two-tailed F-test having 2, 21 degrees of freedom, select one of the following conclusions that best describes your conclusion.

", "minMarks": "3", "maxMarks": "3", "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["

The test statistic falls in the upper critical region. Reject the Null Hypothesis at the 5% level and conclude that student's average marks are affected by the background sounds.

", "

Accept the Null Hypothesis at the 5% significance level and conclude that student's average marks are unaffected by the background sounds.

", "

The test statistic falls in the lower critical region. Reject the Null Hypothesis at the 5% level and conclude that student's average marks are affected by the background sounds.

"], "matrix": "v"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}