// 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.
\nGroup 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.
\nTheir scores are given below:
\nGroup 1 | \nGroup 2 | \nGroup 3 | \n
{r1[0]} | \n{r2[0]} | \n{r3[0]} | \n
{r1[1]} | \n{r2[1]} | \n{r3[1]} | \n
{r1[2]} | \n{r2[2]} | \n{r3[2]} | \n
{r1[3]} | \n{r2[3]} | \n{r3[3]} | \n
{r1[4]} | \n{r2[4]} | \n{r3[4]} | \n
{r1[5]} | \n{r2[5]} | \n{r3[5]} | \n
{r1[6]} | \n{r2[6]} | \n{r3[6]} | \n
{r1[7]} | \n{r2[7]} | \n{r3[7]} | \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)\n | Sum of squares | \ndegrees of freedom | \nmean square | \nF | \n
\n Between \n | \n[[0]] | \n2 | \n[[2]] | \n[[4]] | \n
\n Within \n | \n[[1]] | \n21 | \n[[3]] | \n\n |
Correct to 2 decimal places, enter the lower table statistic: F = [[5]]
\nCorrect 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 | Group 1 | \nGroup 2 | \nGroup 3 | \n
\\({n_i}\\) | \n8 | \n8 | \n8 | \n
\\(\\sum{x_i}\\) | \n{sum_r1} | \n{sum_r2} | \n{sum_r3} | \n
\\(\\sum{x_i^2}\\) | \n{r1sqd} | \n{r2sqd} | \n{r3sqd} | \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 | Sum of Squares | \ndeg. of freedom | \nMean square | \nF | \n
Between | \n\\(\\var{ss_betw}\\) | \n2 | \n\\(\\var{msb}\\) | \n\\(\\var{test_statistic}\\) | \n
Within | \n\\(\\var{ss_within}\\) | \n21 | \n\\(\\var{msw}\\) | \n\n |
\n
The F-table values will have \\(F_{2,21}=2, 21\\) degrees of freedom.
\nThe lower cut-off point is found using \\(\\frac{1}{F_{21,2}}\\)
\nSignificance | \n0.05 | \n
Lower limit | \n0.025 | \n
Upper limit | \n4.42 | \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/"}]}