// Numbas version: exam_results_page_options {"name": "TLU Workshop", "metadata": {"description": "", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", "", "", "", ""], "questions": [{"name": "simplify linear", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "
Simplify the following algebraic expression:
", "advice": "Remember to group like terms. Group 'x' terms with 'x' terms and numbers with numbers.
\n$\\var{a}x+\\var{b}+\\var{c}x$
\n= $\\var{a}x+\\var{c}x+\\var{b}$
\n=$\\var{d}x+\\var{b}$
\n", "rulesets": {}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2 .. 6#1)", "description": "", "templateType": "randrange"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(3 .. 6#1)", "description": "", "templateType": "randrange"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(4 .. 7#1)", "description": "", "templateType": "randrange"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "a+c", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\var{a}x+\\var{b}+\\var{c}x$
", "answer": "({a}+{c})*x+{b}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Summation notation ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "tags": ["REBEL", "rebel", "Rebel", "rebelmaths", "summation"], "metadata": {"description": "rebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "The following table lists five pairs of $x$ and $f$ values.
\n$\\mathbf{x}$ | {x1} | {x2} | {x3} | {x4} | {x5} |
---|---|---|---|---|---|
$\\mathbf{f} $ | \n{f1} | \n{f2} | \n{f3} | \n{f4} | \n{f5} | \n
$\\sum x = $ [[0]]
\n$\\sum f = $ [[1]]
\n$\\sum fx = $ [[2]]
\n$\\sum fx^2 =$ [[3]]
", "stepsPenalty": 0, "steps": [{"type": "information", "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": "$\\Sigma$ just means 'sum of' or total.
\nFor example:
\n$\\Sigma x$ means add up the $x$ values
\n"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{x1}+{x2}+{x3}+{x4}+{x5}", "maxValue": "{x1}+{x2}+{x3}+{x4}+{x5}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{f1}+{f2}+{f3}+{f4}+{f5}", "maxValue": "{f1}+{f2}+{f3}+{f4}+{f5}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{f1}*{x1}+{f2}*{x2}+{f3}*{x3}+{f4}*{x4}+{f5}*{x5}", "maxValue": "{f1}*{x1}+{f2}*{x2}+{f3}*{x3}+{f4}*{x4}+{f5}*{x5}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{f1}*{x1}^2+{f2}*{x2}^2+{f3}*{x3}^2+{f4}*{x4}^2+{f5}*{x5}^2", "maxValue": "{f1}*{x1}^2+{f2}*{x2}^2+{f3}*{x3}^2+{f4}*{x4}^2+{f5}*{x5}^2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Julie's copy of STAT7009 Hypothesis test, single sample, one sided t-test on sample mean caustic material ADAPTIVE MARKING", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "The managers at a chemical company claim that one of their products contains on average {mu0} ml of caustic material per litre. If there is too much caustic material, the product will be dangerous. A government inspector is brought in to test the product. She randomly selects a sample of {sample_size}, litre-size containers of the product and finds that the mean weight of caustic materials is {sample_mean} ml per litre with a sample standard deviation of {sample_stdev} ml
", "advice": "In this example we have a single sample of {sample_size} data values.
\n\\(H_0:\\) $\\mu$ \\(=\\var{mu0}\\)
\n\\(H_A:\\) $\\mu > \\var{mu0}$
\nGiven a sample of size \\(n\\) recall:
\nthe formula for the sample mean: \\(\\overline{x}=\\frac{\\sum {x}}{n}=\\var{sample_mean}\\)
\nthe formula for the sample standard deviation: \\(s=\\sqrt{\\frac{\\sum{(x-\\overline{x})^2}}{n-1}}=\\var{sample_stdev}\\)
\nthe formula for the t-statistic: \\(t_{stat}=\\frac{\\overline{x}-\\mu}{\\frac{s}{\\sqrt{n}}}=\\frac{\\var{sample_mean}-\\var{mu0}}{\\frac{\\var{sample_stdev}}{\\sqrt{\\var{sample_size}}}}=\\var{test_statistic}\\)
\nthe absolute value of $t_{stat} = |t_{stat}| = |\\var{test_statistic}|=\\var{abs_test}$
\nFor a significance level of 5%:
\n$t_{{\\alpha},\\var{sample_size}-1}=\\var{critical}$
\n
d)
{Correctc}
", "rulesets": {}, "variables": {"sample_mean": {"name": "sample_mean", "group": "Ungrouped variables", "definition": "random(4.05 .. 4.4#0.05)", "description": "", "templateType": "randrange"}, "Falsec": {"name": "Falsec", "group": "Ungrouped variables", "definition": "if(abs(test_statistic)Null Hypothesis
\n$\\operatorname{H}_0\\;: \\; \\mu=\\;$[[0]]
\nAlternative Hypothesis
\n$\\operatorname{H}_A\\;: \\; \\mu > $[[1]]
", "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": "mu0", "maxValue": "mu0", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "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": "mu0", "maxValue": "mu0", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "Give all your answers correct to two decimal places.
\nInput the sample mean: \\(\\bar{x}=\\) [[0]]
\nInput the sample standard deviation: \\(s=\\) [[1]]
\nShould we use the z or t test statistic? [[2]] enter z or t
\nEnter the value for the test statistic: [[3]]
\nEnter the value for the absolute value of the test statistic [[4]]
\n", "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": "sample_mean", "maxValue": "sample_mean", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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": "sample_stdev", "maxValue": "sample_stdev", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "t", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "t", "value": ""}]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "sample_mean", "part": "p0g0", "must_go_first": true}, {"variable": "sample_mean", "part": "p0g1", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "test_statistic", "maxValue": "test_statistic", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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": "abs(test_statistic)", "maxValue": "abs(test_statistic)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "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": "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": "Use tables to find the critical value for a significance level of 5%.
\n\ncritical value = [[0]]
\n", "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": "tcrit-0.01", "maxValue": "tcrit+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "Your Decision: [[0]]
\n\n\n
\n
Conclusion: [[1]]
", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "test_statistic", "part": "p1g3", "must_go_first": false}, {"variable": "tcrit", "part": "p2g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Reject the null hypothesis", "Fail to reject the null hypothesis"], "matrix": "mm"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "test_statistic", "part": "p1g3", "must_go_first": false}, {"variable": "tcrit", "part": "p2g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["The data provides evidence against the company's claim that their product contains on average {mu0} ml of caustic material per litre.", "The does not provide evidence against the company's claim that their product contains on average {mu0} ml of caustic material per litre."], "matrix": "mm"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Simple Interest easy", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "ungrouped_variables": ["nnn", "nn", "initial", "answer1", "n", "p", "answer2", "interest"], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "Simple Interest, $I=P\\times t\\times r$
\n$I=\\var{initial}\\times \\var{n}\\times \\var{p}/100$
\n$I=\\var{interest}$
\nAdding the interest to the initial amount gives €$\\var{answer1}$.
\n\n", "rulesets": {}, "parts": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "answer1+0.02", "strictPrecision": false, "minValue": "answer1-0.02", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": "50", "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": "2", "showPrecisionHint": false, "type": "numberentry"}], "statement": "An investor puts €$\\var{initial}$ in a savings account that pays $\\var{p}\\%$ simple interest at the end of each year. How much would the investor have after $\\var{n}$ years?
\nGive your answer to $2$ decimal places.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"nnn": {"definition": "random(1..5#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "nnn", "description": ""}, "nn": {"definition": "random(1..4#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "nn", "description": ""}, "initial": {"definition": "random(2000..10000#100)", "templateType": "randrange", "group": "Ungrouped variables", "name": "initial", "description": ""}, "answer1": {"definition": "initial*(1 + n*p/100)", "templateType": "anything", "group": "Ungrouped variables", "name": "answer1", "description": ""}, "n": {"definition": "nnn + nn", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "p": {"definition": "random(5..15#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "p", "description": ""}, "interest": {"definition": "n*p*initial/100", "templateType": "anything", "group": "Ungrouped variables", "name": "interest", "description": ""}, "answer2": {"definition": "initial*(1+nnn*p/100)*(1+nn*p/100)", "templateType": "anything", "group": "Ungrouped variables", "name": "answer2", "description": ""}}, "metadata": {"description": "Simple interest.
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Julie's copy of Savings compound interest 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}], "functions": {}, "ungrouped_variables": ["P", "perc", "n", "int", "A"], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "The compound interest formula is: $\\ A = P(1+i)^n $
\nPart (a)
\nP represents the principal sum invested , so in this example it is €$\\var{P}$.
\nPart (b)
\ni represents the rate of compound interest, in this example, the annual interest rate is $\\var{perc}$% so i is $\\frac {\\var{perc}} {100}=\\var{int}$.
\nPart (c)
\nn represents the number of compounding periods , so in this example it is $\\var{n}$ years.
\nPart(d)
\nThe amount in the deposit account after $\\var{n}$ years is denoted by A. Using the compound interest formula:
\n$A=P(1+i)^n$
\n$A=\\var{P} \\times(1+\\var{int})^\\var{n}=\\var{A}$
", "rulesets": {}, "parts": [{"prompt": "What is the value of P?
\n€[[0]]
", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "P+0.0001", "minValue": "P-0.0001", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "What is the value of i ?
\n\n[[0]]
", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "int+0.000001", "minValue": "int-0.000001", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "What is the value of n?
\n[[0]]
", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "n+0.0001", "minValue": "n-0.0001", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "How much will be in the deposit account after $\\var{n}$ years? Please give your answer to the nearest cent.
\n€[[0]]
\n", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "A+0.01", "minValue": "A-0.01", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "A lump sum of €$\\var{P}$ is deposited into a savings account, that pays compound interest at a rate of $\\var{perc}$% per annum for $\\var{n}$ years. If no withdrawals are made from the account, then the amount that the lump sum will have grown to is given by the formula:
\n\n$\\ A = P(1+i)^n $
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"perc": {"definition": "random(1..4.5 # 0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "perc", "description": ""}, "P": {"definition": "random(500..10000 # 500)", "templateType": "anything", "group": "Ungrouped variables", "name": "P", "description": ""}, "int": {"definition": "perc/100", "templateType": "anything", "group": "Ungrouped variables", "name": "int", "description": ""}, "A": {"definition": "precround(P*(1+int)^n,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "A", "description": ""}, "n": {"definition": "random(2..7 # 1)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}}, "metadata": {"notes": "", "description": "Calculate the final amount in a savings account where compound interest is earned annually
", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Contact Mechanics: Twin-disc test", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Contact.png", "/srv/numbas/media/question-resources/Contact.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Francis Franklin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1887/"}], "tags": [], "metadata": {"description": "A gold ball on a steel table - effect of its own weight.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "The size of the contact and the pressure between the contacting surfaces depends on:
\nMaterials: A single material property - the Elastic Contact Modulus ($E^*$) - combines the elastic properties of both contacting surfaces into an equivalent stiffness:
\n\\[{1 \\over E^*} = {1 - \\nu_1^2 \\over E_1} + {1 - \\nu_2^2 \\over E_2}\\]
\nwhere $E_1$ and $E_2$ are the Young's elastic moduli of the two materials, and $\\nu_1$ and $\\nu_2$ are the corresponding Poisson's ratios.
\nGeometry: The two simplest forms of contact between curved surfaces are:
\nIn either case, an equivalent radius $R$ can be defined. If both surfaces are convex, e.g., two balls touching, then:
\n\\[{1 \\over R} = {1 \\over R_1} + {1 \\over R_2}\\]
\nwhere $R_1$ is the radius of Surface 1 and $R_2$ is the radius of Surface 2. If, however, one surface is concave, e.g., a ball in a cup, then:
\n\\[{1 \\over R} = {1 \\over R_1} - {1 \\over R_2}\\]
\nwhere $R_1$ is the radius of (convex) Surface 1 and $R_2$ is the radius of (concave) Surface 2. (The 'cup' radius must be larger than the 'ball' radius.)
\nApplied Load: This is a little tricky because the same notation, $P$, is used to mean different things:
\n2D Contact: The peak contact pressure, $p_0$, and semi-contact width, $a$, are given by:
\n\\[p_0 = \\left({P E^* \\over \\pi R}\\right)^{1 \\over 2}\\]
\n\\[a = \\left({4 P R \\over \\pi E^*}\\right)^{1 \\over 2}\\]
\n3D Contact: The peak contact pressure, $p_0$, and semi-contact width, $a$, are given by:
\n\\[p_0 = \\left({6 P {E^*}^2 \\over \\pi^3 R^2}\\right)^{1 \\over 3}\\]
\n\\[a = \\left({3 P R \\over 4 E^*}\\right)^{1 \\over 3}\\]
", "advice": "${1 \\over R} = {1 \\over R_1} + {1 \\over R_2} = {1 \\over \\var{diawheel} \\div 2} + {1 \\over \\var{diarail} \\div 2}$ [units: mm$^{-1}$]
\nwhich can be rearranged to give $R = \\var{siground(R*1000,3)}$mm.
\n${1 \\over E^*} = {1 - \\nu_1^2 \\over E_1} + {1 - \\nu_2^2 \\over E_2} ={1 - 0.3^2 \\over 209 \\times 10^9} + {1 - 0.3^2 \\over 209 \\times 10^9}$
\nwhich can be rearranged to give $E^* = \\var{siground(ECM,3)}$GPa.
\n$p_0 = \\left({P E^* \\over \\pi R}\\right)^{1 \\over 2} =\\left({ \\left( \\var{load} \\times 10^3 \\div \\var{width} \\times 10^{-3} \\right) \\times \\var{siground(ECM,3)} \\times 10^9 \\over \\pi \\times \\var{siground(R*1000,3)} \\times 10^{-3}} \\right)^{1 \\over 2} = \\var{siground(p0,3)}$MPa.
\n$a = \\left({4 P R \\over \\pi E^*}\\right)^{1 \\over 2} = \\left({4 \\times\\left( \\var{load} \\times 10^3 \\div \\var{width} \\times 10^{-3} \\right) \\times \\var{siground(R*1000,3)} \\times 10^{-3} \\over \\pi \\times \\var{siground(ECM,3)} \\times 10^9}\\right)^{1 \\over 2} = \\var{siground(scw,3)}$mm.
\narea = $2 \\times \\var{siground(scw,3)}$mm $\\times \\var{width}$mm $= \\var{siground(area,3)}$mm$^2$.
", "rulesets": {}, "variables": {"scw": {"name": "scw", "group": "Ungrouped variables", "definition": "(4 * P * R / (pi * ECM * 10^9))^(1/2) * 1000", "description": "Semi-contact width. [Units: mm]
", "templateType": "anything"}, "p0": {"name": "p0", "group": "Ungrouped variables", "definition": "(P * ECM*10^9 / (pi * R))^(1/2) / 10^6", "description": "Peak contact pressure. [Units: MPa]
", "templateType": "anything"}, "load": {"name": "load", "group": "Ungrouped variables", "definition": "random(4..7#0.5)", "description": "Applied load. [Units: kN]
", "templateType": "anything"}, "diarail": {"name": "diarail", "group": "Ungrouped variables", "definition": "random(40..47#0.1)", "description": "Rail disc diameter. [Units: mm]
", "templateType": "anything"}, "ECM": {"name": "ECM", "group": "Ungrouped variables", "definition": "1/((1-0.3^2)/209+(1-0.3^2)/209)", "description": "Elastic Contact Modulus. [Units: GPa]
", "templateType": "anything"}, "width": {"name": "width", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "Track width. [Units: mm]
", "templateType": "anything"}, "area": {"name": "area", "group": "Ungrouped variables", "definition": "2*scw*width", "description": "Contact area. [Units: mm$^2$]
", "templateType": "anything"}, "P": {"name": "P", "group": "Ungrouped variables", "definition": "(load*1000)/(width/1000)", "description": "Load per unit length. [Units: N/m]
", "templateType": "anything"}, "R": {"name": "R", "group": "Ungrouped variables", "definition": "1/(2000/diawheel+2000/diarail)", "description": "Equivalent radius. [Units: m]
", "templateType": "anything"}, "diawheel": {"name": "diawheel", "group": "Ungrouped variables", "definition": "random(40..47#0.1)", "description": "Wheel disc diameter. [Units: mm]
", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["diawheel", "diarail", "R", "ECM", "width", "load", "P", "p0", "scw", "area"], "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": "Reference values:
\nIn a twin-disc test, a 'wheel' disc (machined from a steel train wheel) with diameter $\\var{diawheel}$ mm runs against a 'rail' disc (machined from a steel railway rail) with diameter $\\var{diarail}$ mm.
\nThe disc surfaces are cylindrical with the axes aligned. The width of the surfaces is $\\var{width}$ mm.
\nThe applied load is $\\var{load}$ kN.
\nCalculate:
\nExample of a dilution calculation involving mass concentration and molarity calculations.
", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"showFeedbackIcon": true, "stepsPenalty": 0, "marks": 0, "showCorrectAnswer": true, "prompt": "A \"stock\" solution contained $\\var{stock_mass}$g of sodium chloride (NaCl) in $\\var{stock_volume}$L of solution. $\\var{stock_volume_used}$ml of the \"stock\" solution was diluted to $\\var{final_volume}$ml. What is the concentration of the final solution in g/L and M? [Relative atomic masses (Da): Na $\\var{Na}$; Cl $\\var{Cl}$].
\n[[0]] g/L
\n[[1]] M
", "gaps": [{"minValue": "final_mass_concentration - 0.0005", "maxValue": "final_mass_concentration + 0.0005", "marks": ".5", "precisionPartialCredit": 0, "showCorrectAnswer": true, "allowFractions": false, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacements": [], "strictPrecision": false, "scripts": {}, "mustBeReducedPC": 0, "showPrecisionHint": false, "showFeedbackIcon": true, "precision": "3", "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "correctAnswerFraction": false, "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "correctAnswerStyle": "plain"}, {"minValue": "final_molarity - 0.0005", "maxValue": "final_molarity + 0.0005", "marks": ".5", "precisionPartialCredit": 0, "showCorrectAnswer": true, "allowFractions": false, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacements": [], "strictPrecision": false, "scripts": {}, "mustBeReducedPC": 0, "showPrecisionHint": false, "showFeedbackIcon": true, "precision": "3", "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "correctAnswerFraction": false, "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "correctAnswerStyle": "plain"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"minValue": "stock_mass_concentration - 0.0005", "maxValue": "stock_mass_concentration + 0.0005", "marks": ".5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "1) Our \"stock\" solution contains $\\var{stock_mass}$g of sodium chloride (NaCl) in $\\var{stock_volume}$L of solution. Calculate the concentration of the \"stock\" solution in g/L.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "NaCl - 0.0005", "maxValue": "NaCl + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "2) Calculate the molecular weight of sodium chloride (NaCl)
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "stock_mass / NaCl - 0.0005", "maxValue": "stock_mass / NaCl + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "3) Calculate how many moles of sodium chloride there are in $\\var{stock_mass}$g.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "stock_molarity - 0.0005", "maxValue": "stock_molarity + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": false, "variableReplacementStrategy": "originalfirst", "prompt": "4) Calculate the concentration of the \"stock\" solution in M (mol/L).
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "stock_volume_used / 1000 - 0.0005", "maxValue": "stock_volume_used / 1000 + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "5) Calculate what $\\var{stock_volume_used}$ml is as a volume in litres.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "stock_mass_concentration * stock_volume_used / 1000 - 0.0005", "maxValue": "stock_mass_concentration * stock_volume_used / 1000 + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "6) Calculate how many grams of sodium chloride there are in $\\var{stock_volume_used}$ml of the \"stock\" solution using your answers to parts 1 and 5.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "stock_molarity * stock_volume_used / 1000 - 0.0005", "maxValue": "stock_molarity * stock_volume_used / 1000 + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "7) Calculate how many moles of sodium chloride there are in $\\var{stock_volume_used}$ml of the \"stock\" solution using your answers to parts 4 and 5.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "final_volume / 1000 - 0.0005", "maxValue": "final_volume / 1000 + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "8) Calculate what $\\var{final_volume}$ml is as a volume in litres.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "final_mass_concentration - 0.0005", "maxValue": "final_mass_concentration + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "9) Using your answers to parts 6 and 8, calculate the concentration in g/L of the final solution.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}, {"minValue": "final_molarity - 0.0005", "maxValue": "final_molarity + 0.0005", "marks": "0.5", "showCorrectAnswer": true, "allowFractions": false, "variableReplacements": [], "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "10) Using your answers to parts 7 and 8, calculate the concentration in M of the final solution.
", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false}], "scripts": {}, "type": "gapfill"}], "ungrouped_variables": ["stock_volume_used", "Cl", "Na", "NaCl", "stock_mass_concentration", "final_mass_concentration", "stock_volume", "stock_molarity", "final_volume", "final_molarity", "stock_mass"], "functions": {}, "preamble": {"js": "", "css": ""}, "variable_groups": [{"name": "Unnamed group", "variables": []}], "advice": "We have been asked to do quite a lot of calculations in this example so let's break it up into several smaller parts. To work out the concentrations in g/L and M after dilution, we need to first work out the concentrations in g/L and M of the \"stock\" solution. Let's start by working out the concentration of the \"stock\" solution in g/L.
\n\nThe \"stock\" solution contains $\\var{stock_mass}$g of sodium chloride dissolved in $\\var{stock_volume}$L of solution. To work out the concentration in g/L we use the formula
\n$\\dfrac{\\text{mass of substance (in grams)}}{\\text{volume of liquid (in litres)}} = \\text{concentration (in g/L)}.$
\nPutting in our numbers we find that the concentration of the \"stock\" solution in g/L is
\n$\\dfrac{\\var{stock_mass}}{\\var{stock_volume}} = \\var{stock_mass / stock_volume} \\text{ g/L}.$
\n\nNext, we can work out the concentration of the stock solution in M (mol/L). The formula for this is
\n$\\dfrac{\\text{number of moles of substance}}{\\text{volume of liquid (in litres)}} = \\text{concentration (in mol/L)}.$
\n\nWe can see that we need to work out how many moles of sodium chloride (NaCl) there are in $\\var{stock_mass}$g. The formula for this is
\n$\\dfrac{\\text{mass of substance (in grams)}}{\\text{molecular weight}} = \\text{number of moles}.$
\n\nWe can see that to do this, we are going to need to work out the molecular weight of sodium chloride (NaCl). We have been told the atomic weights of each of the atoms in sodium chloride (NaCl) so we can do this by adding together the atomic weights of all the atoms to get the molecular weight which is
\n$1 \\times \\var{Na} + 1 \\times \\var{Cl} = \\var{NaCl} \\text{ Da}.$
\n\nWe can now use this to work out how many moles of sodium chloride there are in $\\var{stock_mass}$g using the formula above. Putting in the numbers we find that there are
\n$\\dfrac{\\var{stock_mass}}{\\var{NaCl}} = \\var{stock_mass / NaCl} \\text{ moles}$
\nof sodium chloride in $\\var{stock_mass}$g. We can now work out the concentration of the \"stock\" solution in M (mol/L). The formula is
\n$\\dfrac{\\text{number of moles of substance}}{\\text{volume of liquid (in litres)}} = \\text{concentration (in mol/L)}.$
\nWe have $\\var{stock_mass}$g of sodium chloride dissolved in $\\var{stock_volume}$L of liquid and we have calculated that there are $\\var{stock_mass / NaCl}$ moles of sodium chloride in $\\var{stock_mass}$g. Putting these numbers into the formula we find that the concentration of the \"stock\" solution in M is
\n$\\dfrac{\\var{stock_mass / NaCl}}{\\var{stock_volume}} = \\var{stock_molarity} \\text{ M}.$
\n\nLet's recap what we have calculated so far. We have worked out that the concentration of the \"stock\" solution in g/L is
\n$\\var{stock_mass_concentration} \\text{ g/L}$
\nand in M is
\n$\\var{stock_molarity} \\text{ M}.$
\n\nSince we are diluting $\\var{stock_volume_used}$ml of the \"stock\" solution, we need to work out how much sodium chloride there is in $\\var{stock_volume_used}$ml of the solution using the concentrations we have calculated. We need to work this amount out in both grams and moles, let's start with grams. If we rearrange the formula
\n$\\dfrac{\\text{mass of substance (in grams)}}{\\text{volume of liquid (in litres)}} = \\text{concentration (in g/L)}.$
\nwe find that
\n${\\text{volume of liquid (in litres)}} \\times \\text{concentration (in g/L)} = \\text{mass of substance (in grams)}.$
\n\nNow, $\\var{stock_volume_used}$ml is equal to
\n$\\dfrac{\\var{stock_volume_used}}{1000} = \\var{stock_volume_used / 1000} \\text{ L},$
\nso in $\\var{stock_volume_used}$ml of \"stock\" solution, there are
\n$\\var{stock_volume_used / 1000} \\times \\var{stock_mass_concentration} = \\var{(stock_volume_used / 1000) * stock_mass_concentration} \\text{ g}$
\nof sodium chloride. Similarly, we can work out the number of moles of sodium chloride using the formula
\n${\\text{volume of liquid (in litres)}} \\times \\text{concentration (in mol/L)} = \\text{number of moles of substance}.$
\nPutting in our numbers, we find that in $\\var{stock_volume_used}$ml of \"stock\" solution, there are
\n$\\var{stock_volume_used / 1000} \\times \\var{stock_molarity} = \\var{(stock_volume_used / 1000) * stock_molarity} \\text{ moles}$
\nof sodium chloride.
\n\nFinally, we can work out the concentration of the diluted solution. We know that $\\var{stock_volume_used}$ml of \"stock\" solution is diluted to $\\var{final_volume}$ml so the final volume of liquid is $\\var{final_volume}$ml. We have worked out that in $\\var{stock_volume_used}$ml of stock solution there are $\\var{(stock_volume_used / 1000) * stock_mass_concentration}$g ($\\var{(stock_volume_used / 1000) * stock_molarity}$ moles) of sodium chloride and we have not added any more sodium chloride so in our diluted solution we have $\\var{(stock_volume_used / 1000) * stock_mass_concentration}$g ($\\var{(stock_volume_used / 1000) * stock_molarity}$ moles) of sodium chloride in $\\var{final_volume}$l of liquid. The formula for the concentration in g/L is
\n$\\dfrac{\\text{mass of substance (in grams)}}{\\text{volume of liquid (in litres)}} = \\text{concentration (in g/L)}.$
\n$\\var{final_volume}$ml is equal to $\\var{final_volume / 1000}$L and so the concentration of the diluted solution in g/L is
\n$\\begin{align}\\dfrac{\\var{(stock_volume_used / 1000) * stock_mass_concentration}}{\\var{final_volume / 1000}} & = \\var{final_mass_concentration} \\\\ & = \\var{precround(final_mass_concentration, 3)} \\text{ g/L to 3 d.p.}\\end{align}$
\nThe formula for concentration in M (mol/L) is
\n$\\dfrac{\\text{number of moles of substance}}{\\text{volume of liquid (in litres)}} = \\text{concentration (in mol/L)}$
\nso the concentration of the diluted solution in M is
\n$\\begin{align}\\dfrac{\\var{(stock_volume_used / 1000) * stock_molarity}}{\\var{final_volume / 1000}} & = \\var{final_molarity} \\\\ & = \\var{precround(final_molarity, 3)} \\text{ M to 3 d.p.}\\end{align}$
", "variables": {"stock_mass_concentration": {"description": "The mass concentration of the \"stock\" solution in g/L.
", "name": "stock_mass_concentration", "definition": "stock_mass / stock_volume", "group": "Ungrouped variables", "templateType": "anything"}, "Cl": {"description": "atomic weight of chlorine
", "name": "Cl", "definition": "35.453", "group": "Ungrouped variables", "templateType": "anything"}, "final_molarity": {"description": "", "name": "final_molarity", "definition": "stock_molarity * stock_volume_used / final_volume", "group": "Ungrouped variables", "templateType": "anything"}, "Na": {"description": "atomic weight of sodium
", "name": "Na", "definition": "22.990", "group": "Ungrouped variables", "templateType": "anything"}, "stock_mass": {"description": "The mass of the substance (in grams) dissolved in the \"stock\" solution
", "name": "stock_mass", "definition": "50 * random(2..8)\n", "group": "Ungrouped variables", "templateType": "anything"}, "final_volume": {"description": "The volume the sample of \"stock\" solution is diluted to in ml.
", "name": "final_volume", "definition": "50 * random(5..10)", "group": "Ungrouped variables", "templateType": "anything"}, "final_mass_concentration": {"description": "", "name": "final_mass_concentration", "definition": "stock_mass_concentration * stock_volume_used / final_volume", "group": "Ungrouped variables", "templateType": "anything"}, "stock_molarity": {"description": "The molarity of the \"stock\" solution
", "name": "stock_molarity", "definition": "stock_mass_concentration / NaCl", "group": "Ungrouped variables", "templateType": "anything"}, "stock_volume_used": {"description": "The volume of the \"stock\" solution used for dilution in ml.
", "name": "stock_volume_used", "definition": "100", "group": "Ungrouped variables", "templateType": "anything"}, "stock_volume": {"description": "The volume of liquid in the \"stock\" solution in litres.
", "name": "stock_volume", "definition": "0.5 * random(2..5)", "group": "Ungrouped variables", "templateType": "anything"}, "NaCl": {"description": "molecular weight of sodium chloride
", "name": "NaCl", "definition": "Na + Cl", "group": "Ungrouped variables", "templateType": "anything"}}, "rulesets": {}, "statement": "Answer the following question. Please give your answers as decimals, not as fractions. Give your answers to 3 decimal places but only round your calculations at the final step, use the exact values in your calculator for intermediate steps.
\nClicking on 'Show steps' will provide you with some prompts to break down the question into smaller parts.
\nIf you would like to see how to do this question, click on 'Reveal answers' at the bottom of the page.
", "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question"}, {"name": "Julie's copy of SLR and Correlation", "extensions": ["stats", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {"regfun2": {"definition": "\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n{boundingBox:[-5,maxy,maxx,-5],\n axis:true,\n showNavigation:false,\n grid:false,\n });\n var board = div.board; \n //var n=length(r1);\n //var names = 'ABCDEFGHIJKLMNOP';\nfor (j=0;jAs you alter your line the values for $a$ and $b$ in the equation $Y = a + bX$ will be shown in red below.
\n\nValue of $a$ for interactive line:
\nValue of $b$ for interactive line:
\nThe Sum of the Squares of the Errors (SSE) for the interactive line is :
\nRemember you are trying to make the SSE as small as possible.
\n{regressline(r1,r2,min(r1)-10,max(r1)+10,min(r2)-10,max(r2)+10,n)}
\n\nClick on Show steps if you want to see the minimum value for SSE and the best fitting straight line. There are no marks awarded for this part of the question and you will not lose any marks in subsequent parts by clicking on Show steps.
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "\n
The minimum value of the SSE is: {sumr}
\n\n
{regfun3(r1,r2,max(r1)+10,max(r2)+10,rsquared,sumr,n)}</p>
Calculate the equation of the best fitting regression line, $Y = a + bX.$
\nDetermine $a$ and $b$ to 5 decimal places and input them below to 3 decimal places.
\n$a=\\;$[[0]], $b=\\;$[[1]] (both to 3 decimal places.)
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "To find $a$ and $b$ you first find $\\displaystyle b = \\frac{n\\Sigma xy-\\Sigma x \\Sigma y}{n\\Sigma x^2 -(\\Sigma x)^2}$
\nThen $\\displaystyle a = \\frac{\\Sigma y - b \\Sigma x}{n}$
\nNote that $n$ is the number of data points. In this case $\\var{n}$
\nNow go back and fill in the values for $a$ and $b$.
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "a+tol", "minValue": "a-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "b+tol", "minValue": "b-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "
Calculate the correlation coefficient $r$ to 5 decimal places, then input below to 3 decimal places.
\n
$r=\\;$[[0]], (to 3 decimal places)
\\[r=\\frac{n\\Sigma xy -\\Sigma x \\Sigma y}{\\sqrt{n\\Sigma x^2-(\\Sigma x)^2}\\sqrt{n\\Sigma y^2-(\\Sigma y)^2}}\\]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "corr+tol", "minValue": "corr-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "There are $\\var{n}$ observations of datapoints $(X,Y)$ given in the table below.
\n$X$ | \n$\\var{r1[0]}$ | \n$\\var{r1[1]}$ | \n$\\var{r1[2]}$ | \n$\\var{r1[3]}$ | \n$\\var{r1[4]}$ | \n$\\var{r1[5]}$ | \n$\\var{r1[6]}$ | \n$\\var{r1[7]}$ | \n$\\var{r1[8]}$ | \n$\\var{r1[9]}$ | \n
---|---|---|---|---|---|---|---|---|---|---|
$Y$ | \n$\\var{r2[0]}$ | \n$\\var{r2[1]}$ | \n$\\var{r2[2]}$ | \n$\\var{r2[3]}$ | \n$\\var{r2[4]}$ | \n$\\var{r2[5]}$ | \n$\\var{r2[6]}$ | \n$\\var{r2[7]}$ | \n$\\var{r2[8]}$ | \n$\\var{r2[9]}$ | \n
The scatterplot for this data is shown below.
\n\n{regfun2(r1,r2,max(r1)+10,max(r2)+10,rsquared,sumr,n)}
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"ch": {"definition": "random(0..n-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "ch", "description": ""}, "pos": {"definition": "1+ch", "templateType": "anything", "group": "Ungrouped variables", "name": "pos", "description": ""}, "b1": {"definition": "random(-0.45..0.45#0.05)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "sxy": {"definition": "sum(map(r1[x]*r2[x],x,0..n-1))", "templateType": "anything", "group": "Ungrouped variables", "name": "sxy", "description": ""}, "fit": {"definition": "map(precround((a+b*r1[x]),2),x,0..n-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "fit", "description": ""}, "res": {"definition": "map(precround(r2[x]-(a+b*r1[x]),2),x,0..n-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "res", "description": ""}, "spxy": {"definition": "sxy-t[0]*t[1]/n", "templateType": "anything", "group": "Ungrouped variables", "name": "spxy", "description": ""}, "ls": {"definition": "precround(a+b*sc,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ls", "description": ""}, "tol": {"definition": "0.0005", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}, "a": {"definition": "precround(1/n*(t[1]-spxy/ss[0]*t[0]),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "ssq": {"definition": "[sum(map(x^2,x,r1)),sum(map(x^2,x,r2))]", "templateType": "anything", "group": "Ungrouped variables", "name": "ssq", "description": ""}, "sumr": {"definition": "precround(sum(map(res[x]^2,x,0..n-1)),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "sumr", "description": ""}, "a1": {"definition": "random(10..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "corr": {"definition": "precround(spxy/(sqr(ss[0]*ss[1])),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "corr", "description": ""}, "tsqovern": {"definition": "[t[0]^2/n,t[1]^2/n]", "templateType": "anything", "group": "Ungrouped variables", "name": "tsqovern", "description": ""}, "b": {"definition": "precround(spxy/ss[0],3)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "obj": {"definition": "['A','B','C','D','E','F','G','H']", "templateType": "anything", "group": "Ungrouped variables", "name": "obj", "description": ""}, "r1": {"definition": "repeat(round(normalsample(25,6)),n)", "templateType": "anything", "group": "Ungrouped variables", "name": "r1", "description": ""}, "r2": {"definition": "map(round(a1+b1*x+random(-3..3)),x,r1)", "templateType": "anything", "group": "Ungrouped variables", "name": "r2", "description": ""}, "ss": {"definition": "[ssq[0]-t[0]^2/n,ssq[1]-t[1]^2/n]", "templateType": "anything", "group": "Ungrouped variables", "name": "ss", "description": ""}, "n": {"definition": "10", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "t": {"definition": "[sum(r1),sum(r2)]", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "sc": {"definition": "r1[ch]", "templateType": "anything", "group": "Ungrouped variables", "name": "sc", "description": ""}, "rsquared": {"definition": "precround(spxy^2/(ss[0]*ss[1]),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "rsquared", "description": ""}}, "metadata": {"description": "For a given set of data points:
\nUse an interactive scatterplot to add best fit line and compare to true regression line via scatterplot solution and given minimum SSE.
\nDetermine values for intercept and slope of least squares regression line.
\nDetermine correlation and r squared value.
\nDetermine prediction and residual at a given X value.
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Julie's copy of Find the equation of a line through two points - positive gradient", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}], "tags": [], "metadata": {"description": "Use two points on a line graph to calculate the gradient and $y$-intercept and hence the equation of the straight line running through both points.
\nThe answer box for the third part plots the function which allows the student to check their answer against the graph before submitting.
\nThis particular example has a positive gradient.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "In this question we will identify the equation of the straight line passing through points $A=(\\var{xa},\\var{ya})$ and $B=(\\var{xb},\\var{yb})$ in the form $y = mx + c$.
\n{plotPoints()}
", "advice": "We find the equation of a straight line passing through two points by finding the gradient and the $y$-intercept of the line.
\nWe can find the gradient ($m$) using the points $A = (x_1,y_1)=(\\var{xa},\\var{ya})$ and $B = (x_2,y_2)=(\\var{xb},\\var{yb})$.
\nAs the definition of gradient is the ratio of vertical change ($y_2-y_1$) to horizontal change ($x_2-x_1$).
The equation for gradient is,
\\begin{align}
m &= \\frac{y_2-y_1}{x_2-x_1} \\\\[0.5em]
&= \\frac{\\simplify[!collectNumbers]{{yb}-{ya}}}{\\simplify[!collectNumbers]{{xb}-{xa}}} \\\\[0.5em]
&= \\frac{\\simplify[]{{yb}-{ya}}}{\\simplify{{xb}-{xa}}} \\\\[0.5em]
&= \\simplify[simplifyFractions,unitDenominator]{({yb-ya})/({xb-xa})}\\text{.}
\\end{align}
Rearranging the equation $y=mx+c$ and substituting either of the points gives
\n\\[c = y_1-mx_1 \\quad \\mathrm{or} \\quad c = y_2-mx_2 \\,\\text{.} \\]
\nWe can then also use this equation with the other point's coordinates to check our answer.
\nLet's use point $A$ first:
\n\\[
\\begin{align}
c &= y_1-mx_1 \\\\
&= \\var{ya}-\\var[fractionnumbers]{m}\\times\\var{xa} \\\\
& = \\simplify[fractionnumbers]{{ya-m*xa}}\\text{.}
\\end{align}
\\]
We then check this against point $B$:
\n\\[
\\begin{align}
y_2 &= mx_2 + c \\\\[0.5em]
&= \\simplify[fractionNumbers]{{m}{xb}+{c}} \\\\[0.5em]
&= \\var[fractionnumbers]{m*xb+c}\\text{.}
\\end{align}
\\]
We can now substitute these values for $m$ and $c$ into $y=mx+c$ to get:
\n\\[y=\\simplify[!noLeadingMinus,fractionNumbers,unitFactor]{{m} x+ {c}}\\text{.}\\]
\nThe green line drawn on the graph represents the above line equation.
\n{correctPoints()}
", "rulesets": {}, "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "(ya-yb)/(xa-xb)", "description": "", "templateType": "anything"}, "yb": {"name": "yb", "group": "Ungrouped variables", "definition": "ya+random([2,4])", "description": "", "templateType": "anything"}, "xa": {"name": "xa", "group": "Ungrouped variables", "definition": "random(-4..-1)", "description": "", "templateType": "anything"}, "ya": {"name": "ya", "group": "Ungrouped variables", "definition": "random(-4..2)", "description": "", "templateType": "anything"}, "xb": {"name": "xb", "group": "Ungrouped variables", "definition": "xa+random([2,4] except -xa)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "ya-m*xa", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "\n", "maxRuns": 100}, "ungrouped_variables": ["xa", "xb", "ya", "yb", "m", "c"], "variable_groups": [], "functions": {"correctPoints": {"parameters": [], "type": "html", "language": "javascript", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n\nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\n\n\nquestion.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\n//define ans as this \ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}, "plotPoints": {"parameters": [], "type": "html", "language": "javascript", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n var ans;\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//this is the beating heart of whatever plots the function,\n//I've changed this from being curve to functiongraph\n var line = board.create('functiongraph',[function(x){\nif(ans) {\n try {\nnscope.variables.x.value = x;\n var val = Numbas.jme.evaluate(ans,nscope).value;\n return val;\n }\n catch(e) {\nreturn 13;\n }\n}\nelse\n return 13;\n },-12,12]\n , {strokeColor:\"blue\",strokeWidth: 4} );\n \nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: false, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\nquestion.lines = {\n l:line, c:correct_line\n}\n\n question.signals.on('HTMLAttached',function() {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n\n//define ans as this \ntry {\n ans = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n ans = null;\n}\nline.updateCurve();\ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}}, "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": "Calculate the gradient, $m$, of the straight line between these two points.
\n$m=$ [[0]]
\n", "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": "m", "maxValue": "m", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "Use this gradient and the coordinates of the points to calculate the $y$-intercept, $c$.
\n$c=$ [[0]]
", "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": "c", "maxValue": "c", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "Give the equation of the straight line through these points in the form $y=mx+c$.
\n$\\displaystyle y=$ [[0]]
\nUse the graph to plot your answer and check that it goes through these points.
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "m", "part": "p0", "must_go_first": true}, {"variable": "c", "part": "p1", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{m}*x+{c}", "answerSimplification": "fractionNumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "notallowed": {"strings": ["c", "m"], "showStrings": false, "partialCredit": 0, "message": "You must input your answer in the form y = mx +c where m and c are numbers.
"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Julie's copy of TP6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "parts": [{"showFeedbackIcon": true, "prompt": "\n$y = $ [[0]]
", "variableReplacements": [], "sortAnswers": false, "showCorrectAnswer": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "steps": [{"showFeedbackIcon": true, "scripts": {}, "prompt": "It may be helpful to factor out y. For example:
\n\\[\\simplify{x^{{n1}}*y+{n2}*y*x - {n3}*y}=y(\\simplify{x^{{n1}} + {n2}*x - {n3}})\\]
", "showCorrectAnswer": true, "variableReplacements": [], "customMarkingAlgorithm": "", "marks": 0, "type": "information", "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true}], "type": "gapfill", "stepsPenalty": 0, "gaps": [{"showFeedbackIcon": true, "checkVariableNames": false, "variableReplacements": [], "showCorrectAnswer": true, "vsetRangePoints": 5, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "failureRate": 1, "scripts": {}, "customMarkingAlgorithm": "", "showPreview": true, "vsetRange": [0, 1], "type": "jme", "answer": "{n4}/(x^{{n1}} + {n2}*x-{n3})", "marks": "5", "checkingType": "absdiff", "checkingAccuracy": 0.001}]}], "tags": [], "functions": {}, "advice": "Here, we first have to collect all terms involving $y$ on the same side. Hence, we get:
\n\\[\\simplify{x^{{n1}}*y+{n2}*y*x - {n3}*y} = \\var{n4}\\]
\nWe then spot that $y$ appears exactly once in each term on the left, so factorise:
\n\\[y(\\simplify{x^{{n1}} + {n2}*x - {n3}}) = \\var{n4}\\]
\nand simple division gives the answer.
", "rulesets": {}, "ungrouped_variables": ["n1", "n2", "n3", "n4"], "statement": "Consider the equation:
\n\\[\\simplify{x^{{n1}}*y + {n2}*y*x} = \\simplify{{n3}*y} + \\var{n4}\\]
\nRe-arrange this equation to make $y$ the subject.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"js": "", "css": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Another transposition question, which requires (basic) factorisation.
\nrebelmaths
"}, "variables": {"n1": {"definition": "random(2..6)", "group": "Ungrouped variables", "templateType": "anything", "name": "n1", "description": ""}, "n4": {"definition": "random(1..10)", "group": "Ungrouped variables", "templateType": "anything", "name": "n4", "description": ""}, "n3": {"definition": "random(-7..7 except 0 n2)", "group": "Ungrouped variables", "templateType": "anything", "name": "n3", "description": ""}, "n2": {"definition": "random(-7..7 except 0)", "group": "Ungrouped variables", "templateType": "anything", "name": "n2", "description": ""}}, "type": "question"}, {"name": "MATH6005 T3Q5 (adaptive)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "advice": "", "variable_groups": [], "tags": [], "statement": "Let $N = \\begin{pmatrix} 1 & 2 & 8\\\\ 1 & 3 & 4\\\\ k & k & 1 \\end{pmatrix}$.
", "metadata": {"licence": "None specified", "description": ""}, "rulesets": {}, "ungrouped_variables": ["N1", "invN1", "A"], "preamble": {"js": "", "css": ""}, "parts": [{"customMarkingAlgorithm": "", "customName": "", "useCustomName": false, "prompt": "For what values of $k$ does $N$ have an inverse?
\n$k\\neq $ [[0]]
", "type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "extendBaseMarkingAlgorithm": true, "scripts": {}, "sortAnswers": false, "showCorrectAnswer": true, "gaps": [{"customMarkingAlgorithm": "malrules:\n [\n [\"-1/12\", \"Some good work done but not quite there yet. Did you get a determinant of $1-12k$? Be careful when you let this $=0$ and solve - watch the signs carefully.\"],\n [\"1/28\", \"You're on the right track but it looks like you have made one important mistake. Look back at your notes to check how to calculate the determinant of a $2 \\\\times 2$ matrix. Pay particular attention to the signs.\"],\n [\"-1/28\", \"You're on the right track but it looks like you have made a couple of small but important mistakes. Look back at your notes to check how to calculate the determinant of a $2 \\\\times 2$ matrix. Pay particular attention to the signs. Also be very careful with signs when solving the determinant $=0$.\"],\n [\"-44/5\", \"Some good work done but not quite there yet. It looks like you have made a couple of small but important mistakes. Look back at your notes to check how to calculate the determinant of both a $2 \\\\times 2$ and a $3 \\\\times 3$ matrix. Pay particular attention to the signs in both cases.\"],\n [\"44/5\", \"Some good work done but not quite there yet. It looks like you have made a couple of small but important mistakes. Look back at your notes to check how to calculate the determinant of both a $2 \\\\times 2$ and a $3 \\\\times 3$ matrix. Pay particular attention to the signs in both cases. Also be very careful with signs when solving the determinant $=0$.\"],\n [\"5/28\", \"You're on the right track but it looks like you have made one important mistake. Look back at your notes to check how to calculate the determinant of a $3 \\\\times 3$ matrix. Pay particular attention to the signs.\"],\n [\"-5/28\", \"You're on the right track but it looks like you have made one important mistake. Look back at your notes to check how to calculate the determinant of a $3 \\\\times 3$ matrix. Pay particular attention to the signs. Also be very careful with signs when solving the determinant $=0$.\"]\n ]\n\n\nparsed_malrules: \n map(\n [\"expr\":parse(x[0]),\"feedback\":x[1]],\n x,\n malrules\n )\n\nagree_malrules (Do the student's answer and the expected answer agree on each of the sets of variable values?):\n map(\n len(filter(not x ,x,map(\n try(\n resultsEqual(unset(question_definitions,eval(studentexpr,vars)),unset(question_definitions,eval(malrule[\"expr\"],vars)),settings[\"checkingType\"],settings[\"checkingAccuracy\"]),\n message,\n false\n ),\n vars,\n vset\n )))$N^{-1} = $ [[0]]
", "type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "extendBaseMarkingAlgorithm": true, "scripts": {}, "sortAnswers": false, "showCorrectAnswer": true, "gaps": [{"customMarkingAlgorithm": "", "customName": "", "correctAnswerFractions": true, "useCustomName": false, "markPerCell": true, "allowResize": false, "type": "matrix", "marks": "9", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "tolerance": 0, "numColumns": "3", "allowFractions": true, "correctAnswer": "invN1", "numRows": "3"}]}, {"customMarkingAlgorithm": "", "customName": "", "useCustomName": false, "prompt": "Let $k=-1$ as in part (b). Given the matrix $A = \\begin{pmatrix} 13 & 13 & -13\\\\ 26 & 52 & 26\\\\ 0 & 13 & 65 \\end{pmatrix}$, solve for $M$ in the equation $MN = A$.
\n$M = $ [[0]]
", "type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "extendBaseMarkingAlgorithm": true, "scripts": {}, "sortAnswers": false, "showCorrectAnswer": true, "gaps": [{"customMarkingAlgorithm": "", "customName": "", "correctAnswerFractions": false, "useCustomName": false, "markPerCell": true, "allowResize": false, "type": "matrix", "marks": "9", "variableReplacementStrategy": "originalfirst", "variableReplacements": [{"part": "p1g0", "variable": "invN1", "must_go_first": true}], "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "tolerance": 0, "numColumns": "3", "allowFractions": true, "correctAnswer": "A*invN1", "numRows": "3"}]}], "functions": {}, "variables": {"N1": {"definition": "matrix([1, 2, 8], [1, 3, 4], [-1, -1, 1])", "templateType": "anything", "name": "N1", "description": "", "group": "Ungrouped variables"}, "invN1": {"definition": "matrix([\n[7/13,-10/13,-16/13],\n[-5/13,9/13,4/13],\n[2/13,-1/13,1/13]\n])", "templateType": "anything", "name": "invN1", "description": "", "group": "Ungrouped variables"}, "A": {"definition": "matrix([13, 13, -13], [26, 52, 26], [0, 13, 65])", "templateType": "anything", "name": "A", "description": "", "group": "Ungrouped variables"}}, "variablesTest": {"condition": "", "maxRuns": 100}}, {"name": "Julie's copy of Sheet 2 Q10 Chain rule question with custom feedback", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "tags": [], "metadata": {"description": "Chain rule question with feedback given for anticipated student errors.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "Let $y=\\sin (\\var{a}x^{\\var{n}}-\\var{b}x)$. What is $\\frac{dy}{dx}$?
", "advice": "", "rulesets": {}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..7)", "description": "multiple of the power of x
", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "power on the x
", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9 except a)", "description": "multiple of x
", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "n", "b"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "$\\frac{dy}{dx}=$ [[0]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "malrules:\n [\n [\"-({a*n}*x^{n-1}-{b})*cos({a}*x^{n}-{b}*x)\", \"Almost there! Double check the rule for differentiating $\\\\sin x$.\"],\n [\"cos({a}*x^{n}-{b}*x)\", \"You have used the correct rule for differentiating $\\\\sin x$. However, since the angle is more complicated than $x$, what extra step do you need to include?\"],\n [\"-cos({a}*x^{n}-{b}*x)\", \"Double check the rule for differentiating $\\\\sin x$. Also, since the angle is more complicated than $x$, what extra step do you need to include?\"],\n [\"cos({a*n}*x^{n-1}-{b})\", \"Remember, the angle in a trigonometric function never changes when you differentiate it!\"],\n [\"-cos({a*n}*x^{n-1}-{b})\", \"Remember, the angle in a trigonometric function never changes when you differentiate it! Also, double check the rule for differentiating $\\\\sin x$.\"],\n [\"cos({a}*x^{n}-{b}*x)+({a*n}*x^{n-1}-{b})*sin\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"],\n [\"-cos({a}*x^{n}-{b}*x)+({a*n}*x^{n-1}-{b})*sin\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"],\n [\"cos({a}*x^{n}-{b}*x)+sin({a*n}*x^{n-1}-{b})\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"],\n [\"-cos({a}*x^{n}-{b}*x)+sin({a*n}*x^{n-1}-{b})\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"]\n ]\n\nparsed_malrules: \n map(\n [\"expr\":parse(x[0]),\"feedback\":x[1]],\n x,\n malrules\n )\n\nagree_malrules (Do the student's answer and the expected answer agree on each of the sets of variable values?):\n map(\n len(filter(not x ,x,map(\n try(\n resultsEqual(unset(question_definitions,eval(studentexpr,vars)),unset(question_definitions,eval(malrule[\"expr\"],vars)),settings[\"checkingType\"],settings[\"checkingAccuracy\"]),\n message,\n false\n ),\n vars,\n vset\n )))