// Numbas version: exam_results_page_options {"name": "12: Statistics - Borehole", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "statement": "

The following table shows the thickness, in mm, of a sample of the strata found in 2 separate boreholes.

\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
Borehole A (mm) Borehole  B (mm)
{ia[0]}{ib[0]}
{ia[1]}{ib[1]}
{ia[2]}{ib[2]}
{ia[3]}{ib[3]}
{ia[4]}{ib[4]}
{ia[5]}{ib[5]}
{ia[6]}{ib[6]}
{ia[7]}{ib[7]}
{ia[8]}{ib[8]}
{ia[9]}{ib[9]}
\n

Useful formulae

\n

For $N$ measurements, $x_i$, $i = 1,2,3,...,N$

\n

mean, $\\bar x = \\frac{1}{N}\\sum\\limits_{i=1}^{N}x_i$

\n

sample variance, $s^2 = \\frac{1}{N}\\big(\\sum\\limits_{i=1}^{N}(x_i - \\bar x)^2\\big) = \\overline {x^2} - \\bar x^2$

\n

unbiased estimate of population variance, $\\hat s^2 = \\frac{N}{N-1} s^2$

\n

standard deviation is the square root of variance.

\n

standard error in the mean, $SE = \\frac{\\hat s}{\\sqrt{N}}$

\n

Complete the following:

", "metadata": {"description": "

This question will help you understand and calculate various statistical concepts like mean, median, variance etc.

", "licence": "All rights reserved"}, "parts": [{"scripts": {}, "gaps": [{"maxValue": "{meana}", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{meana}", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}, {"maxValue": "{meanb}", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{meanb}", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}], "showCorrectAnswer": true, "prompt": "

Calculate the mean thickness for each sample.

\n

Mean thickness of sample in borehole A: [[0]] mm

\n

Mean thickness of sample in borehole  B: [[1]] mm

", "steps": [{"scripts": {}, "showCorrectAnswer": true, "prompt": "

Step 1.  Add up all the ob

", "type": "information", "marks": 0, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "marks": 0, "stepsPenalty": 0, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "showCorrectAnswer": true, "prompt": "

Determine the median thickness for each sample.

\n

Median thickness  of sample in borehole A: [[0]] mm

\n

Median thickness  of sample in borehole B: [[1]] mm

", "type": "gapfill", "marks": 0, "gaps": [{"maxValue": "{meda}", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{meda}", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}, {"maxValue": "{medb}", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{medb}", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}], "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "showCorrectAnswer": true, "prompt": "

Calculate the variance of each sample.

\n

Sample of borehole A variance: [[0]] mm2

\n

Sample of borehole B variance: [[1]] mm2

", "type": "gapfill", "marks": 0, "gaps": [{"maxValue": "{sampvara}", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{sampvara}", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}, {"maxValue": "{sampvarb}", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{sampvarb}", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain"}], "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "showCorrectAnswer": true, "prompt": "

Calculate an unbiased estimate of the standard deviation of the population represented by each sample, showing the formula you use. Give your answers to 3 decimal places.

\n

\n

$\\hat s_A$ = [[0]] mm

\n

$\\hat s_B$ = [[1]] mm

", "type": "gapfill", "marks": 0, "gaps": [{"precisionPartialCredit": 0, "precisionType": "dp", "strictPrecision": false, "maxValue": "sqrt({sampvara}*10/9)", "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "sqrt({sampvara}*10/9)", "allowFractions": false, "showPrecisionHint": false, "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precision": "3"}, {"precisionPartialCredit": 0, "precisionType": "dp", "strictPrecision": false, "maxValue": "sqrt({sampvarb}*10/9)", "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "sqrt({sampvarb}*10/9)", "allowFractions": false, "showPrecisionHint": false, "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precision": "3"}], "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "showCorrectAnswer": true, "prompt": "

Determine the standard error in the mean thickness  for the two samples. Give your answers to 3 decimal places.

\n

$SE_A$ = [[0]] mm

\n

$SE_B$ = [[1]] mm

", "type": "gapfill", "marks": 0, "gaps": [{"precisionPartialCredit": 0, "precisionType": "dp", "strictPrecision": false, "maxValue": "{sea}", "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{sea}", "allowFractions": false, "showPrecisionHint": false, "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precision": "3"}, {"precisionPartialCredit": 0, "precisionType": "dp", "strictPrecision": false, "maxValue": "{seb}", "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "type": "numberentry", "marks": 1, "variableReplacements": [], "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "minValue": "{seb}", "allowFractions": false, "showPrecisionHint": false, "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precision": "3"}], "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}], "variables": {"ib": {"description": "", "name": "ib", "templateType": "anything", "definition": "repeat(round(normalsample(popmeanb,3)),10)", "group": "Ungrouped variables"}, "meana": {"description": "", "name": "meana", "templateType": "anything", "definition": "mean(ia)", "group": "Ungrouped variables"}, "seb": {"description": "", "name": "seb", "templateType": "anything", "definition": "sqrt({sampvarb}*10/90)", "group": "Ungrouped variables"}, "meanb": {"description": "", "name": "meanb", "templateType": "anything", "definition": "mean(ib)", "group": "Ungrouped variables"}, "sampvara": {"description": "", "name": "sampvara", "templateType": "anything", "definition": "variance(ia)", "group": "Ungrouped variables"}, "sea": {"description": "", "name": "sea", "templateType": "anything", "definition": "sqrt({sampvara}*10/90)", "group": "Ungrouped variables"}, "ia": {"description": "", "name": "ia", "templateType": "anything", "definition": "repeat(round(normalsample(popmeana,3)),10)", "group": "Ungrouped variables"}, "meda": {"description": "", "name": "meda", "templateType": "anything", "definition": "median(ia)", "group": "Ungrouped variables"}, "sampvarb": {"description": "", "name": "sampvarb", "templateType": "anything", "definition": "variance(ib)", "group": "Ungrouped variables"}, "popmeana": {"description": "", "name": "popmeana", "templateType": "anything", "definition": "19 + random(5..20)", "group": "Ungrouped variables"}, "popmeanb": {"description": "", "name": "popmeanb", "templateType": "anything", "definition": "random(24..45 except[popmeana])", "group": "Ungrouped variables"}, "medb": {"description": "", "name": "medb", "templateType": "anything", "definition": "median(ib)", "group": "Ungrouped variables"}}, "extensions": ["stats"], "ungrouped_variables": ["ia", "ib", "meda", "medb", "sampvara", "sampvarb", "meana", "meanb", "popmeana", "popmeanb", "sea", "seb"], "advice": "

a) We use the formula for the mean. In our case we have $N$ = 10 since we have 10 measurements for each borehole. We find the total for Borehole A to be {meana*10} and the total for Borehole B to be {meanb*10}. All that remains is to divide each by $N$ = 10.

\n

b) We first order each list of measurements (ascending or descending order will do!).

\n

Borehole A measurements = {ordered(ia)}

\n

Borehole B measurements = {ordered(ib)}

\n

Since we have 10 measurements, the medians lie between the fifth and sixth values in our ordered lists. To calculate them we simply take the average of those respective values:

\n

Median of A = $\\frac{\\var{ordered(ia)[4]} + \\var{ordered(ia)[5]}}{2} = \\var{meda}$

\n

Median of B = $\\frac{\\var{ordered(ib)[4]} + \\var{ordered(ib)[5]}}{2} = \\var{medb}$

\n

c) We use either form of the formula for the sample variance. Here we will use the simpler form which requires us to first calculate the sum of squared measurements for each sample. (Make sure you understand and can apply these useful formulae before the exam!)

\n

Sample A variance = $\\overline {x^2 }- \\bar x^2 = \\frac{\\var{sumsqrd(ia)}}{10} - \\var{meana}^2 = \\var{sampvara}$

\n

Sample B variance = $\\overline {x^2 }- \\bar x^2 = \\frac{\\var{sumsqrd(ib)}}{10} - \\var{meanb}^2 = \\var{sampvarb}$

\n

d) We note that we are asked for the standard deviation, not the variance, so we will need to take a square root at some point. We want to obtain $\\hat s$, so we take the square root of the given formula for the unbiased estimate of population variance: $\\hat s =\\sqrt{ s^2\\frac{N}{N-1}}$. We now plug in our previously calculated values of the sample variance, $s^2$, and round to 3 decimal places:

\n

$\\hat s_A = \\sqrt{\\var{sampvara}\\times\\frac{10}{9}} = \\var{sqrt({sampvara}*10/9)} =\\var{precround(sqrt({sampvara}*10/9),3)} $

\n

$\\hat s_B = \\sqrt{\\var{sampvarb}\\times\\frac{10}{9}} = \\var{sqrt({sampvarb}*10/9)}=\\var{precround(sqrt({sampvarb}*10/9),3)} $

\n

e) We use the formula for the standard error in the mean. We calculated the values of $\\hat s$ in part d), so all that is left to do is to divide these values by $\\sqrt{10}$.

\n

$SE_A$= $\\var{sqrt({sampvara}*10/90)}= \\var{precround(sqrt({sampvara}*10/90),3)}$

\n

$SE_B$= $\\var{sqrt({sampvarb}*10/90)}= \\var{precround(sqrt({sampvarb}*10/90),3)}$

\n

(You might have a slightly different answer if you have used the rounded value from part d). It is good practice to use the unrounded values in later calculations unless directed otherwise. You can make this easier by storing the previous answers in your calculator's memory. If you do not know how to do this, please follow the link to see a 30-second tutorial: https://vimeo.com/101615630)

\n

", "rulesets": {}, "functions": {"overlaps": {"type": "boolean", "parameters": [["a", "list"], ["b", "list"]], "language": "javascript", "definition": "return (a[1] > b[0])&&(a[0] < b[1]);"}, "ordered": {"type": "list", "parameters": [["li", "list"]], "language": "javascript", "definition": "return li.sort();"}}, "variable_groups": [], "name": "12: Statistics - Borehole", "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "contributors": [{"name": "Nasir Firoz Khan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/909/"}]}]}], "contributors": [{"name": "Nasir Firoz Khan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/909/"}]}