// Numbas version: finer_feedback_settings {"name": "Descriptive Stats (P): Mode", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"values1": {"name": "values1", "group": "Part a", "definition": "repeat(random(1..20),5)", "description": "
A random set of data
", "templateType": "anything"}, "show_values1": {"name": "show_values1", "group": "Part a", "definition": "shuffle(values1+[mode1])", "description": "Values shown to the student.
\nMake sure the mode is unique by picking one possible mode, and adding another copy of it to the list.
", "templateType": "anything"}, "mode2": {"name": "mode2", "group": "Part b", "definition": "shuffle(mode(values2))[0]", "description": "", "templateType": "anything"}, "values2": {"name": "values2", "group": "Part b", "definition": "repeat(random(1..20),8)", "description": "", "templateType": "anything"}, "show_values2": {"name": "show_values2", "group": "Part b", "definition": "shuffle(values2+[mode2])", "description": "", "templateType": "anything"}, "mode1": {"name": "mode1", "group": "Part a", "definition": "shuffle(mode(values1))[0]", "description": "A mode of the random set of data. There will be more than one if two values appear the same (maximal) number of times
", "templateType": "anything"}}, "rulesets": {}, "showQuestionGroupNames": false, "ungrouped_variables": [], "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Descriptive Stats (P): Mode", "parts": [{"allowFractions": false, "maxValue": "mode1", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "correctAnswerFraction": false, "showCorrectAnswer": true, "prompt": "{table([show_values1],[])}
", "showPrecisionHint": false, "scripts": {}, "minValue": "mode1", "marks": 1, "type": "numberentry"}, {"allowFractions": false, "maxValue": "mode2", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "correctAnswerFraction": false, "showCorrectAnswer": true, "prompt": "{table([show_values2],[])}
", "showPrecisionHint": false, "scripts": {}, "minValue": "mode2", "marks": 1, "type": "numberentry"}], "question_groups": [{"name": "", "pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": []}], "variable_groups": [{"variables": ["values1", "mode1", "show_values1"], "name": "Part a"}, {"variables": ["values2", "mode2", "show_values2"], "name": "Part b"}], "advice": "The mode is the value which appears the most often in the data set.
\nIt can help to put the values in order:
\n{table([sort(show_values1)],[])}
\nThe mode of these numbers is $\\var{mode1}$.
\nSimilarly, it can help to first put the values in order:
\n{table([sort(show_values2)],[])}
\nThe mode of these numbers is $\\var{mode2}$.
\n", "metadata": {"description": "Find the modes of two small samples.
", "notes": "", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "tags": [], "functions": {}, "statement": "Find the mode of each list of numbers.
", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}