// Numbas version: finer_feedback_settings {"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", "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": ""}, "ungrouped_variables": ["scenario", "decision_matrix", "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"], "extensions": ["stats"], "type": "question", "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

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

\n

", "variable_groups": [], "functions": {}, "variables": {"f_u": {"name": "f_u", "templateType": "number", "description": "", "group": "Ungrouped variables", "definition": "3.82"}, "ss_within": {"name": "ss_within", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "precround(r1sqd-sum_r1^2/8+r2sqd-sum_r2^2/8+r3sqd-sum_r3^2/8,2)"}, "sum_r1": {"name": "sum_r1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "sum(r1)"}, "decision_matrix": {"name": "decision_matrix", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "[\n [1,0.0],\n [0,1,0],\n [0,0,1]\n][scenario]"}, "test_statistic": {"name": "test_statistic", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "precround((ss_betw/2)/(ss_within/21),2)"}, "msw": {"name": "msw", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "precround({ss_within}/21,2)"}, "r3": {"name": "r3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "vector(repeat(random(45..99),8))"}, "r1sqd": {"name": "r1sqd", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "dot(r1,r1)"}, "sum_r3": {"name": "sum_r3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "sum(r3)"}, "sum_r2": {"name": "sum_r2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "sum(r2)"}, "scenario": {"name": "scenario", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "sum(map(abs(test_statistic)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]]

", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "minValue": "ss_betw", "type": "numberentry", "maxValue": "ss_betw", "precision": "1", "mustBeReduced": false, "showPrecisionHint": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1}, {"scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "minValue": "ss_within", "type": "numberentry", "maxValue": "ss_within", "precision": "1", "mustBeReduced": false, "showPrecisionHint": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1}, {"scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "minValue": "ss_betw/2", "type": "numberentry", "maxValue": "ss_betw/2", "precision": "1", "mustBeReduced": false, "showPrecisionHint": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1}, {"scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "minValue": "ss_within/21", "type": "numberentry", "maxValue": "ss_within/21", "precision": "1", "mustBeReduced": false, "showPrecisionHint": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1}, {"scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "minValue": "(ss_betw/2)/(ss_within/21)", "type": "numberentry", "maxValue": "(ss_betw/2)/(ss_within/21)", "precision": "1", "mustBeReduced": false, "showPrecisionHint": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1}, {"scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "minValue": "0.03", "type": "numberentry", "maxValue": "0.03", "precision": "2", "mustBeReduced": false, "showPrecisionHint": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1}, {"scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "minValue": "4.42", "type": "numberentry", "maxValue": "4.42", "precision": "2", "mustBeReduced": false, "showPrecisionHint": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1}], "variableReplacementStrategy": "originalfirst", "marks": 0}, {"variableReplacements": [{"must_go_first": false, "part": "p0", "variable": ""}], "matrix": "decision_matrix", "displayColumns": "1", "type": "1_n_2", "maxMarks": "3", "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.

"], "displayType": "radiogroup", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "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", "showCorrectAnswer": true, "shuffleChoices": false, "scripts": {}, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "rulesets": {}, "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.

", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}