// Numbas version: finer_feedback_settings {"questions": [], "duration": 0, "name": "Correlation Practice", "showQuestionGroupNames": false, "allQuestions": true, "percentPass": 0, "feedback": {"showanswerstate": true, "advicethreshold": 0, "showactualmark": true, "allowrevealanswer": true, "showtotalmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "shuffleQuestions": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculate Pearson correlation coefficient", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"rr1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r1)", "description": "", "name": "rr1"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "darr(n,m,[random(1..20)])", "description": "", "name": "r1"}, "spxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sxy-t[0]*t[1]/n", "description": "", "name": "spxy"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(vector(rr1)-vector(rr2))", "description": "", "name": "d"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "20", "description": "", "name": "m"}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2))]", "description": "", "name": "ssq"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2)]", "description": "", "name": "t"}, "vs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(spcoef >=0.952,[1,0,0,0,0],spcoef>=0.881,[0,1,0,0,0],spcoef>=0.738,[0,0,1,0,0],spcoef>=0.643,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "vs"}, "rr2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r2)", "description": "", "name": "rr2"}, "spcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(6*ssd/(n*(n^2-1)),3)", "description": "", "name": "spcoef"}, "ss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[ssq[0]-t[0]^2/n,ssq[1]-t[1]^2/n]", "description": "", "name": "ss"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "3", "description": "", "name": "k"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(corrcoef >=0.905,[1,0,0,0,0],corrcoef>=0.834,[0,1,0,0,0],corrcoef>=0.707,[0,0,1,0,0],corrcoef>=0.621,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "v"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "8", "description": "", "name": "n"}, "obj": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['A','B','C','D','E','F','G','H']", "description": "", "name": "obj"}, "ssd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(x^2,x,d))", "description": "", "name": "ssd"}, "sxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(r1[x]*r2[x],x,0..n-1))", "description": "", "name": "sxy"}, "r2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tesarr(r1,darr(n,m,[random(1..m)]),9,m)", "description": "", "name": "r2"}, "tsqovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[t[0]^2/n,t[1]^2/n]", "description": "", "name": "tsqovern"}, "corrcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(spxy/sqrt(ss[0]*ss[1]),3)", "description": "", "name": "corrcoef"}}, "ungrouped_variables": ["tsqovern", "obj", "r1", "r2", "ss", "m", "k", "ssq", "ssd", "n", "spcoef", "corrcoef", "vs", "spxy", "t", "tol", "v", "sxy", "rr2", "rr1", "d"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"darr": {"type": "list", "language": "jme", "definition": "if(n=1,a,darr(n-1,m,[random(1..m except a)]+a))", "parameters": [["n", "number"], ["m", "number"], ["a", "list"]]}, "tesarr": {"type": "list", "language": "jme", "definition": "if(marr(map(abs(x),x,list(vector(a)-vector(b))))a[i]){s+=1;}\n else\n if(a[j]==a[i]){c+=1;}\n }\n out[j]=(2*s+c+1)/2;\n }\n return out;", "parameters": [["a", "list"]]}, "marr": {"type": "number", "language": "jme", "definition": "if(length(a)=2,max(a[0],a[1]),max(a[0],marr(a[1..length(a)])))", "parameters": [["a", "list"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "t[0]", "minValue": "t[0]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ssq[0]", "minValue": "ssq[0]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "t[1]", "minValue": "t[1]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ssq[1]", "minValue": "ssq[1]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "sxy", "minValue": "sxy", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ss[0]", "minValue": "ss[0]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ss[1]", "minValue": "ss[1]", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "spxy", "minValue": "spxy", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "corrcoef+tol", "minValue": "corrcoef-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n \n \n \n \n \n \n \n \n \n \n
Wife $(X)$$\\sum x=\\;$[[0]]$\\sum x^2=\\;$[[1]]
Husband $(Y)$$\\sum y=\\;$[[2]]$\\sum y^2=\\;$[[3]]
\n

Also find $\\sum xy=\\;$[[4]] and then:

\n

$\\displaystyle SSX = \\;$[[5]]

\n

$\\displaystyle SSY = \\;$[[6]]

\n

$\\displaystyle SPXY = \\;$[[7]]

\n

Hence calculate the correlation coefficient $r$:

\n

$r=\\;$[[8]]

\n

 

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.621", "minValue": "0.621", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.707", "minValue": "0.707", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.834", "minValue": "0.834", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.905", "minValue": "0.905", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"displayType": "radiogroup", "choices": ["$p \\leq 0.002$, very strong evidence to reject the null hypothesis that there is no association.", "$0.002 \\lt p \\leq 0.01$, strong evidence to reject the null hypothesis that there is no association.", "$0.01 \\lt p \\leq 0.05$, there is evidence to reject the null hypothesis that there is no association.", "$0.05 \\lt p \\leq 0.1$, weak evidence against, do not reject the null hypothesis but consider further investigation.", "$p \\gt 0.1$, no evidence to reject the null hypothesis that there is no association."], "displayColumns": 1, "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "v", "marks": 0}], "type": "gapfill", "prompt": "

Give the value of the correlation coefficient you have found, choose the range for the $p$ value by looking up the relevant table. Input the required values from the table here:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
$10\\%$$5\\%$$1\\%$$0.2\\%$
[[0]][[1]][[2]][[3]]
\n

Then make a decision based on the $p$-value you have found by choosing one of these options:

\n

[[4]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

It is well known that similarity in attitudes, beliefs and interests plays an important role in interpersonal attraction. A researcher developed a questionnaire which was completed by 8 married couples. One question sought to place each individual on a 20 point scale in which low scores represent liberal attitudes and high scores represent conservative attitudes. The data were:

\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
Couple$\\var{obj[0]}$$\\var{obj[1]}$$\\var{obj[2]}$$\\var{obj[3]}$$\\var{obj[4]}$$\\var{obj[5]}$$\\var{obj[6]}$$\\var{obj[7]}$
Wife $(X)$$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$$\\var{r1[6]}$$\\var{r1[7]}$
Husband $(Y)$$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$$\\var{r2[6]}$$\\var{r2[7]}$
\n

In this exercise you will find the Pearson correlation coefficent for the above paired data and comment on the significance of the calculated correlation.

\n

The null hypothesis you are testing is:

\n

$H_0$: There is no association between the attitudes of wives and husbands.

", "tags": ["checked2015", "correlation coefficient", "data analysis", "hypothesis testing", "Pearson correlation coefficient", "PSY2010", "statistics"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

30/09/2102:

\n

Introduced three functions:

\n

1. To produce the ranking of a list of 8 numbers.

\n

2. To produce a list of 8 numbers from a scale of 1..20 which are all distinct.

\n

3. To produce the maximum of the numbers in a list.

\n

4. Given an array such as in 2. to find another such array which has max diff between any two corresponding entries less than a given number. This is to ensure that the two array produced do not differ too much, as the point of the exercise is to show that there is a positive high correlation.

\n

 

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Calculate the Pearson correlation coefficient on paired data and comment on the significance.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The answers to all parts are given on revealing.

"}, {"name": "Calculate Pearson correlation coefficient", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "darr(n,m,[random(1..20)])", "description": "", "name": "r1"}, "spxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sxy-t[0]*t[1]/n", "description": "", "name": "spxy"}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2))]", "description": "", "name": "ssq"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2)]", "description": "", "name": "t"}, "rr1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r1)", "description": "", "name": "rr1"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "3", "description": "", "name": "k"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "10", "description": "", "name": "n"}, "ssd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(x^2,x,d))", "description": "", "name": "ssd"}, "corrcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(spxy/sqrt(ss[0]*ss[1]),3)", "description": "", "name": "corrcoef"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(vector(rr1)-vector(rr2))", "description": "", "name": "d"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "20", "description": "", "name": "m"}, "spcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-6*ssd/(n*(n^2-1)),3)", "description": "", "name": "spcoef"}, "vs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(aspcoef >=0.952,[1,0,0,0,0],aspcoef>=0.881,[0,1,0,0,0],aspcoef>=0.738,[0,0,1,0,0],aspcoef>=0.643,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "vs"}, "rr2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r2)", "description": "", "name": "rr2"}, "sxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(r1[x]*r2[x],x,0..n-1))", "description": "", "name": "sxy"}, "aspcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(spcoef)", "description": "", "name": "aspcoef"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(corrcoef >=0.847,[1,0,0,0,0],corrcoef>=0.765,[0,1,0,0,0],corrcoef>=0.632,[0,0,1,0,0],corrcoef>=0.549,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "v"}, "obj": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['A','B','C','D','E','F','G','H','I','J']", "description": "", "name": "obj"}, "r2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tesarr(r1,darr(n,m,[random(1..m)]),11,m)", "description": "", "name": "r2"}, "ss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[ssq[0]-t[0]^2/n,ssq[1]-t[1]^2/n]", "description": "", "name": "ss"}, "tsqovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[t[0]^2/n,t[1]^2/n]", "description": "", "name": "tsqovern"}}, "ungrouped_variables": ["aspcoef", "spcoef", "vs", "sxy", "spxy", "tol", "ssq", "corrcoef", "ssd", "rr2", "rr1", "r1", "tsqovern", "obj", "d", "r2", "ss", "k", "m", "n", "t", "v"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"darr": {"type": "list", "language": "jme", "definition": "if(n=1,a,darr(n-1,m,[random(1..m except a)]+a))", "parameters": [["n", "number"], ["m", "number"], ["a", "list"]]}, "rk": {"type": "list", "language": "javascript", "definition": "\n /*This gives the ranking of the entries in a, c counts the ties */\n var out = [];\n for(var j=0;ja[i]){s+=1;}\n else\n if(a[j]==a[i]){c+=1;}\n }\n out[j]=(2*s+c+1)/2;\n }\n return out;\n ", "parameters": [["a", "list"]]}, "pstdev": {"type": "number", "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)", "parameters": [["l", "list"]]}, "marr": {"type": "number", "language": "jme", "definition": "if(length(a)=2,max(a[0],a[1]),max(a[0],marr(a[1..length(a)])))", "parameters": [["a", "list"]]}, "tesarr": {"type": "list", "language": "jme", "definition": "if(marr(map(abs(x),x,list(vector(a)-vector(b))))\n \n Wife $(X)$\n $\\sum x=\\;$[[0]]\n $\\sum x^2=\\;$[[1]]\n \n Husband $(Y)$\n $\\sum y=\\;$[[2]]\n $\\sum y^2=\\;$[[3]]\n \n \n \n

Also find $\\sum xy=\\;$[[4]] and then:

\n

$\\displaystyle SSX = \\;$[[5]]

\n

$\\displaystyle SSY = \\;$[[6]]

\n

$\\displaystyle SPXY = \\;$[[7]]

\n

Hence calculate the correlation coefficient $r$:

\n

$r=\\;$[[8]]

\n

 

\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.549", "minValue": "0.549", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.632", "minValue": "0.632", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.765", "minValue": "0.765", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.847", "minValue": "0.847", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"displayType": "radiogroup", "choices": ["$p \\leq 0.002$, very strong evidence to reject the null hypothesis that there is no association.", "$0.002 \\lt p \\leq 0.01$, strong evidence to reject the null hypothesis that there is no association.", "$0.01 \\lt p \\leq 0.05$, there is evidence to reject the null hypothesis that there is no association.", "$0.05 \\lt p \\leq 0.1$, weak evidence against, do not reject the null hypothesis but consider further investigation.", "$p \\gt 0.1$, no evidence to reject the null hypothesis that there is no association."], "displayColumns": 1, "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "v", "marks": 0}], "type": "gapfill", "prompt": "\n

Give the value of the correlation coefficient you have found, choose the range for the $p$ value by looking up the relevant table. Input the required values from the table here:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
$10\\%$$5\\%$$1\\%$$0.2\\%$
[[0]][[1]][[2]][[3]]
\n

Then make a decision based on the $p$-value you have found by choosing one of these options:

\n

[[4]]

\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "

It is well known that similarity in attitudes, beliefs and interests plays an important role in interpersonal attraction. A researcher developed a questionnaire which was completed by 10 married couples. One question sought to place each individual on a 20 point scale in which low scores represent liberal attitudes and high scores represent conservative attitudes. The data were:

\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
Couple$\\var{obj[0]}$$\\var{obj[1]}$$\\var{obj[2]}$$\\var{obj[3]}$$\\var{obj[4]}$$\\var{obj[5]}$$\\var{obj[6]}$$\\var{obj[7]}$$\\var{obj[8]}$$\\var{obj[9]}$
Wife $(X)$$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$$\\var{r1[6]}$$\\var{r1[7]}$$\\var{r1[8]}$$\\var{r1[9]}$
Husband $(Y)$$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$$\\var{r2[6]}$$\\var{r2[7]}$$\\var{r2[8]}$$\\var{r2[9]}$
\n

In this exercise you will find the Pearson correlation coefficent for the above paired data and comment on the significance of the calculated correlation.

\n

The null hypothesis you are testing is:

\n

$H_0$: There is no association between the attitudes of wives and husbands.

", "tags": ["checked2015", "correlation coefficient", "data analysis", "hypothesis testing", "Pearson correlation coefficient", "PSY2010", "statistics"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

30/09/2102:

\n \t\t

Introduced three functions:

\n \t\t

1. To produce the ranking of a list of 8 numbers.

\n \t\t

2. To produce a list of 8 numbers from a scale of 1..20 which are all distinct.

\n \t\t

3. To produce the maximum of the numbers in a list.

\n \t\t

4. Given an array such as in 2. to find another such array which has max diff between any two corresponding entries less than a given number. This is to ensure that the two array produced do not differ too much, as the point of the exercise is to show that there is a positive high correlation.

\n \t\t

 

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Calculate the Pearson correlation coefficient on paired data and comment on the significance.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The answers to all parts are given on revealing.

"}, {"name": "Calculate Spearman rank correlation coefficient and p-values", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "darr(n,m,[random(1..20)])", "description": "", "name": "r1"}, "spxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sxy-t[0]*t[1]/n", "description": "", "name": "spxy"}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2))]", "description": "", "name": "ssq"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2)]", "description": "", "name": "t"}, "rr1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r1)", "description": "", "name": "rr1"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "3", "description": "", "name": "k"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "10", "description": "", "name": "n"}, "ssd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(x^2,x,d))", "description": "", "name": "ssd"}, "corrcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(spxy/sqrt(ss[0]*ss[1]),3)", "description": "", "name": "corrcoef"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(vector(rr1)-vector(rr2))", "description": "", "name": "d"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "20", "description": "", "name": "m"}, "spcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-6*ssd/(n*(n^2-1)),3)", "description": "", "name": "spcoef"}, "vs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(aspcoef >=0.879,[1,0,0,0,0],aspcoef>=0.794,[0,1,0,0,0],aspcoef>=0.648,[0,0,1,0,0],aspcoef>=0.564,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "vs"}, "rr2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r2)", "description": "", "name": "rr2"}, "sxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(r1[x]*r2[x],x,0..n-1))", "description": "", "name": "sxy"}, "aspcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(spcoef)", "description": "", "name": "aspcoef"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(corrcoef >=0.905,[1,0,0,0,0],corrcoef>=0.834,[0,1,0,0,0],corrcoef>=0.707,[0,0,1,0,0],corrcoef>=0.621,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "v"}, "obj": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['A','B','C','D','E','F','G','H','I','J']", "description": "", "name": "obj"}, "r2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tesarr(r1,darr(n,m,[random(1..m)]),9,m)", "description": "", "name": "r2"}, "ss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[ssq[0]-t[0]^2/n,ssq[1]-t[1]^2/n]", "description": "", "name": "ss"}, "tsqovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[t[0]^2/n,t[1]^2/n]", "description": "", "name": "tsqovern"}}, "ungrouped_variables": ["aspcoef", "spcoef", "vs", "sxy", "spxy", "tol", "ssq", "corrcoef", "ssd", "rr2", "rr1", "r1", "tsqovern", "obj", "d", "r2", "ss", "k", "m", "n", "t", "v"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"darr": {"type": "list", "language": "jme", "definition": "if(n=1,a,darr(n-1,m,[random(1..m except a)]+a))", "parameters": [["n", "number"], ["m", "number"], ["a", "list"]]}, "rk": {"type": "list", "language": "javascript", "definition": "\n /*This gives the ranking of the entries in a, c counts the ties */\n var out = [];\n for(var j=0;ja[i]){s+=1;}\n else\n if(a[j]==a[i]){c+=1;}\n }\n out[j]=(2*s+c+1)/2;\n }\n return out;\n \n ", "parameters": [["a", "list"]]}, "pstdev": {"type": "number", "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)", "parameters": [["l", "list"]]}, "marr": {"type": "number", "language": "jme", "definition": "if(length(a)=2,max(a[0],a[1]),max(a[0],marr(a[1..length(a)])))", "parameters": [["a", "list"]]}, "tesarr": {"type": "list", "language": "jme", "definition": "if(marr(map(abs(x),x,list(vector(a)-vector(b))))Spearman Correlation Coefficient

\n

In order to find the Spearman correlation coefficient for the original score data you need to supply the ranked data for the wives and the husbands in the table below. Lowest rank has rank $1$, highest score has rank $10$. Also supply the differences in the ranks, i.e. for each couple find wife's score - husband's score.

\n

Now fill in the ranks given by

\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
Couple$\\var{obj[0]}$$\\var{obj[1]}$$\\var{obj[2]}$$\\var{obj[3]}$$\\var{obj[4]}$$\\var{obj[5]}$$\\var{obj[6]}$$\\var{obj[7]}$$\\var{obj[8]}$$\\var{obj[9]}$
Wife $(X)$[[0]][[1]][[2]][[3]][[4]][[5]][[6]][[7]][[8]][[9]]
Husband $(Y)$[[10]][[11]][[12]][[13]][[14]][[15]][[16]][[17]][[18]][[19]]
Differences[[20]][[21]][[22]][[23]][[24]][[25]][[26]][[27]][[28]][[29]]
\n

 

\n

Hence calculate the Spearman correlation coefficient to 3 decimal places:

\n

$r_s=\\;$[[30]]

\n

Click on Show steps for the Spearman correlation coefficient formula. You will not lose any marks by doing so.

", "steps": [{"type": "information", "prompt": "

If there are two sets of ranks $x_1,x_2,\\ldots,x_n$ and  $y_1,y_2,\\ldots,y_n$ where both sets have no ties, and differences are $d_i=x_i-y_i$ then if $\\sum d_i^2=D$ we have:

\n

\\[r_s=1-\\frac{6 \\times D}{n(n^2-1)}\\]

", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.564", "minValue": "0.564", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.648", "minValue": "0.648", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.794", "minValue": "0.794", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.879", "minValue": "0.879", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Give the value of the Spearman correlation coefficient you have found, find the the significance level by looking up the appropriate values in a table. 

\n

First supply the table values you need from your notes:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
$10\\%$$5\\%$$1\\%$$0.2\\%$
[[0]][[1]][[2]][[3]]
\n

 

", "showCorrectAnswer": true, "marks": 0}, {"displayType": "radiogroup", "choices": ["$p \\leq 0.002$, very strong evidence to reject the hypothesis.", "$0.002 \\lt p \\leq 0.01$, strong evidence to reject the hypothesis.", "$0.01 \\lt p \\leq 0.05$, there is evidence to reject the hypothesis.", "$0.05 \\lt p \\leq 0.1$, weak evidence against, do not reject the hypothesis but consider further investigation.", "$p \\gt 0.1$, no evidence to reject the hypothesis."], "displayColumns": 1, "prompt": "

Given the data above, what decision can you come to as to the hypothesis that the wife and husband in these married couples have the same attitude in relation to liberal and conservative values?

", "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "vs", "marks": 0}], "statement": "

It is well known that similarity in attitudes, beliefs and interests plays an important role in interpersonal attraction. A researcher developed a questionnaire which was completed by 10 married couples. One question sought to place each individual on a 20 point scale in which low scores represent liberal attitudes and high scores represent conservative attitudes. The data were:

\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
Couple$\\var{obj[0]}$$\\var{obj[1]}$$\\var{obj[2]}$$\\var{obj[3]}$$\\var{obj[4]}$$\\var{obj[5]}$$\\var{obj[6]}$$\\var{obj[7]}$$\\var{obj[8]}$$\\var{obj[9]}$
Wife $(X)$$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$$\\var{r1[6]}$$\\var{r1[7]}$$\\var{r1[8]}$$\\var{r1[9]}$
Husband $(Y)$$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$$\\var{r2[6]}$$\\var{r2[7]}$$\\var{r2[8]}$$\\var{r2[9]}$
\n

In this exercise you will find Spearman's correlation coefficient for this data and comment on the significance of the correlation as regards the following null hypothesis:

\n

$H_0$: There is no association between the attitudes of wives and husbands.

", "tags": ["checked2015", "data analysis", "hypothesis testing", "PSY2010", "ranked data", "ranks", "Spearman correlation coefficient", "statistics"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t \t\t

30/09/2102:

\n \t\t \t\t

Introduced three functions:

\n \t\t \t\t

1. To produce the ranking of a list of 8 numbers.

\n \t\t \t\t

2. To produce a list of 8 numbers from a scale of 1..20 which are all distinct.

\n \t\t \t\t

3. To produce the maximum of the numbers in a list.

\n \t\t \t\t

4. Given an array such as in 2. to find another such array which has max diff between any two corresponding entries less than a given number. This is to ensure that the two array produced do not differ too much, as the point of the exercise is to show that there is a positive high correlation.

\n \t\t \t\t

 

\n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Spearman rank correlation calculated. 10 paired observations.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

When the question is revealed you will see all the answers.

"}, {"name": "Calculate the Spearman rank correlation coefficient and p-value", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "r1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "darr(n,m,[random(1..20)])", "description": "", "name": "r1"}, "spxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sxy-t[0]*t[1]/n", "description": "", "name": "spxy"}, "ssq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2))]", "description": "", "name": "ssq"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[sum(r1),sum(r2)]", "description": "", "name": "t"}, "rr1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r1)", "description": "", "name": "rr1"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "3", "description": "", "name": "k"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "8", "description": "", "name": "n"}, "ssd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(x^2,x,d))", "description": "", "name": "ssd"}, "corrcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(spxy/sqrt(ss[0]*ss[1]),3)", "description": "", "name": "corrcoef"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(vector(rr1)-vector(rr2))", "description": "", "name": "d"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "20", "description": "", "name": "m"}, "spcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(1-6*ssd/(n*(n^2-1)),3)", "description": "", "name": "spcoef"}, "vs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(aspcoef >=0.952,[1,0,0,0,0],aspcoef>=0.881,[0,1,0,0,0],aspcoef>=0.738,[0,0,1,0,0],aspcoef>=0.643,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "vs"}, "rr2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rk(r2)", "description": "", "name": "rr2"}, "sxy": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(r1[x]*r2[x],x,0..n-1))", "description": "", "name": "sxy"}, "aspcoef": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(spcoef)", "description": "", "name": "aspcoef"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(corrcoef >=0.905,[1,0,0,0,0],corrcoef>=0.834,[0,1,0,0,0],corrcoef>=0.707,[0,0,1,0,0],corrcoef>=0.621,[0,0,0,1,0],[0,0,0,0,1])", "description": "", "name": "v"}, "obj": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['A','B','C','D','E','F','G','H']", "description": "", "name": "obj"}, "r2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tesarr(r1,darr(n,m,[random(1..m)]),10,m)", "description": "", "name": "r2"}, "ss": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[ssq[0]-t[0]^2/n,ssq[1]-t[1]^2/n]", "description": "", "name": "ss"}, "tsqovern": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[t[0]^2/n,t[1]^2/n]", "description": "", "name": "tsqovern"}}, "ungrouped_variables": ["aspcoef", "spcoef", "vs", "sxy", "spxy", "tol", "ssq", "corrcoef", "ssd", "rr2", "rr1", "r1", "tsqovern", "obj", "d", "r2", "ss", "k", "m", "n", "t", "v"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"darr": {"type": "list", "language": "jme", "definition": "if(n=1,a,darr(n-1,m,[random(1..m except a)]+a))", "parameters": [["n", "number"], ["m", "number"], ["a", "list"]]}, "rk": {"type": "list", "language": "javascript", "definition": "\n /*This gives the ranking of the entries in a, c counts the ties */\n var out = [];\n for(var j=0;ja[i]){s+=1;}\n else\n if(a[j]==a[i]){c+=1;}\n }\n out[j]=(2*s+c+1)/2;\n }\n return out;\n ", "parameters": [["a", "list"]]}, "pstdev": {"type": "number", "language": "jme", "definition": "sqrt(abs(l)/(abs(l)-1))*stdev(l)", "parameters": [["l", "list"]]}, "marr": {"type": "number", "language": "jme", "definition": "if(length(a)=2,max(a[0],a[1]),max(a[0],marr(a[1..length(a)])))", "parameters": [["a", "list"]]}, "tesarr": {"type": "list", "language": "jme", "definition": "if(marr(map(abs(x),x,list(vector(a)-vector(b))))Spearman Correlation Coefficient

\n

In order to find the Spearman correlation coefficient for the original score data you need to supply the ranked data for the wives and the husbands in the table below. Lowest rank has rank $1$, highest score has rank $8$. Also supply the differences in the ranks, i.e. for each couple find wife's score - husband's score.

\n

Now fill in the ranks given by

\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
Couple$\\var{obj[0]}$$\\var{obj[1]}$$\\var{obj[2]}$$\\var{obj[3]}$$\\var{obj[4]}$$\\var{obj[5]}$$\\var{obj[6]}$$\\var{obj[7]}$
Wife $(X)$[[0]][[1]][[2]][[3]][[4]][[5]][[6]][[7]]
Husband $(Y)$[[8]][[9]][[10]][[11]][[12]][[13]][[14]][[15]]
Differences[[16]][[17]][[18]][[19]][[20]][[21]][[22]][[23]]
\n

 

\n

Hence calculate the Spearman correlation coefficient to 3 decimal places:

\n

$r_s=\\;$[[24]]

\n

Click on Show steps for the Spearman correlation coefficient formula. You will not lose any marks by doing so.

\n ", "steps": [{"type": "information", "prompt": "

If there are two sets of ranks $x_1,x_2,\\ldots,x_n$ and  $y_1,y_2,\\ldots,y_n$ where both sets have no ties, and differences are $d_i=x_i-y_i$ then if $\\sum d_i^2=D$ we have:

\n

\\[r_s=1 - \\frac{6 \\times D}{n(n^2-1)}\\]

", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.643", "minValue": "0.643", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.738", "minValue": "0.738", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.881", "minValue": "0.881", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0.952", "minValue": "0.952", "correctAnswerFraction": false, "marks": 0.25, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Give the value of the Spearman correlation coefficient you have found, find the the significance level by looking up the appropriate values in a table. 

\n

First supply the table values you need from your notes:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
$10\\%$$5\\%$$1\\%$$0.2\\%$
[[0]][[1]][[2]][[3]]
\n

 

", "showCorrectAnswer": true, "marks": 0}, {"displayType": "radiogroup", "choices": ["$p \\leq 0.002$, very strong evidence to reject the hypothesis.", "$0.002 \\lt p \\leq 0.01$, strong evidence to reject the hypothesis.", "$0.01 \\lt p \\leq 0.05$, there is evidence to reject the hypothesis.", "$0.05 \\lt p \\leq 0.1$, weak evidence against, do not reject the hypothesis but consider further investigation.", "$p \\gt 0.1$, no evidence to reject the hypothesis."], "displayColumns": 1, "prompt": "

Given the data above, what decision can you come to as to the hypothesis that the wife and husband in these married couples have the same attitude in relation to liberal and conservative values?

", "distractors": ["", "", "", "", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "vs", "marks": 0}], "statement": "

It is well known that similarity in attitudes, beliefs and interests plays an important role in interpersonal attraction. A researcher developed a questionnaire which was completed by 8 married couples. One question sought to place each individual on a 20 point scale in which low scores represent liberal attitudes and high scores represent conservative attitudes. The data were:

\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
Couple$\\var{obj[0]}$$\\var{obj[1]}$$\\var{obj[2]}$$\\var{obj[3]}$$\\var{obj[4]}$$\\var{obj[5]}$$\\var{obj[6]}$$\\var{obj[7]}$
Wife $(X)$$\\var{r1[0]}$$\\var{r1[1]}$$\\var{r1[2]}$$\\var{r1[3]}$$\\var{r1[4]}$$\\var{r1[5]}$$\\var{r1[6]}$$\\var{r1[7]}$
Husband $(Y)$$\\var{r2[0]}$$\\var{r2[1]}$$\\var{r2[2]}$$\\var{r2[3]}$$\\var{r2[4]}$$\\var{r2[5]}$$\\var{r2[6]}$$\\var{r2[7]}$
\n

In this exercise you will find Spearman's correlation coefficient for this data and comment on the significance of the correlation as regards the following null hypothesis:

\n

$H_0$: There is no association between the attitudes of wives and husbands.

", "tags": ["checked2015", "data analysis", "hypothesis testing", "PSY2010", "ranked data", "ranks", "Spearman correlation coefficient", "statistics"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

30/09/2102:

\n \t\t

Introduced three functions:

\n \t\t

1. To produce the ranking of a list of 8 numbers.

\n \t\t

2. To produce a list of 8 numbers from a scale of 1..20 which are all distinct.

\n \t\t

3. To produce the maximum of the numbers in a list.

\n \t\t

4. Given an array such as in 2. to find another such array which has max diff between any two corresponding entries less than a given number. This is to ensure that the two array produced do not differ too much, as the point of the exercise is to show that there is a positive high correlation.

\n \t\t

 

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Spearman rank correlation calculated. 8 paired observations.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

When the question is revealed you will see all the answers.

"}], "name": "", "pickQuestions": 0}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Questions on Pearson and Spearman correlation coefficients.

"}, "type": "exam", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "browse": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "showfrontpage": true}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "pickQuestions": 0, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}