// Numbas version: exam_results_page_options {"name": "Calculating Expected Values given a table of probabilities", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculating Expected Values given a table of probabilities", "type": "question", "tags": ["Dice", "dice", "Expected values", "Expected Values", "Experimental Probability", "experimental probability", "Experimental probability", "Probability", "probability", "relative frequency", "Relative Frequency", "taxonomy", "Theoretical Probability", "theoretical probability"], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"SW": {"templateType": "anything", "name": "SW", "description": "
Probability someone goes to see Star Wars
", "definition": "random(0.4..0.51 #0.05)", "group": "Ungrouped variables"}, "Avatar": {"templateType": "anything", "name": "Avatar", "description": "Probability someone sees Avatar
", "definition": "random(0.2..0.31 #0.05)", "group": "Ungrouped variables"}, "NYSM": {"templateType": "anything", "name": "NYSM", "description": "Probability someone goes to see Now you see me
", "definition": "(1-(Avatar+SW))*3/5", "group": "Ungrouped variables"}, "TIJ": {"templateType": "anything", "name": "TIJ", "description": "Probability someone goes to see the Italian Job
", "definition": "1-(Avatar+SW+NYSM)", "group": "Ungrouped variables"}, "no_people": {"templateType": "anything", "name": "no_people", "description": "Number of people who see a movie.
", "definition": "random(100..180 #20)", "group": "Ungrouped variables"}}, "extensions": [], "functions": {}, "statement": "There are four films being shown in a cinema on a particular day.
\nThe probability that a person buys a ticket to see each film, denoted $P(\\text{Film})$, is given in the table below.
\nFilm | \n$P(\\text{Film})$ | \nGenre | \n
Forgotten Game | \n$\\var{Avatar}$ | \nSci-Fi | \n
The Diamond Valley | \n$\\var{SW}$ | \nSci-Fi | \n
School of Return | \n$\\var{NYSM}$ | \nThriller | \n
The Silk's Nobody | \n$\\var{TIJ}$ | \nCrime | \n
$\\var{no_people}$ people each buy a ticket at the cinema to see a film of their own choosing during the day.
", "variable_groups": [], "parts": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "{no_people}*{Avatar}", "showFeedbackIcon": true, "prompt": "How many of these people would you expect to have bought tickets to see Forgotten Game?
", "minValue": "{no_people}*{Avatar}", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "{no_people}*({Avatar}+{SW})", "showFeedbackIcon": true, "prompt": "How many of these people would you expect to have bought tickets to see a Sci-Fi film?
", "minValue": "{no_people}*({Avatar}+{SW})", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "ungrouped_variables": ["Avatar", "SW", "NYSM", "TIJ", "no_people"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "This question assesses the students ability to find the expected number of times an event occurs given the probability of the event occurring for a single trial and the total number of trials.
"}, "preamble": {"css": "", "js": ""}, "advice": "If we are given the probability of an event occurring in a single trial then we can calculate the expected number of times that this event would occur in a larger number of trials.
\nTo do this, we multiply the probability of the event occurring in a single trial by the total number of trials:
\n\\[\\text{Expected number of times an event occurs} = \\text{Probability of event} \\times \\text{Number of trials}.\\]
\nWe are given the probabilities that someone buys a ticket to see each film in the table below.
\nFilm | \n$P(\\text{Film})$ | \nGenre | \n
Forgotten Game | \n$\\var{Avatar}$ | \nSci-Fi | \n
The Diamond Valley | \n$\\var{SW}$ | \nSci-Fi | \n
School of Return | \n$\\var{NYSM}$ | \nThriller | \n
The Silk's Nobody | \n$\\var{TIJ}$ | \nCrime | \n
We are also told that $\\var{no_people}$ people each buy a ticket at the cinema to see a film of their own choosing during this day.
\nTo calculate the expected number of people who bought tickets to see one of these films we multiply the probability that a person buys a ticket for that film by how many people bought tickets for a film at the cinema.
\nSo the expected number of people who bought tickets to see Forgotten Game is
\n\\[
\\var{Avatar} \\times \\var{no_people} = \\var{{Avatar}*{no_people}}.
\\]
We are now asked to calculate the expected number of people who bought tickets to see a Sci-Fi film.
\nFrom the table above we can see that there are two films which belong to the Sci-Fi genre: Forgotten Game and The Diamond Valley.
\nFirstly, we need to calculate the probability that a person buys a ticket to see a Sci-Fi film, which we will denote $P(\\text{Sci-Fi})$.
\nSince the probability that a person buys a ticket to see each film is different, it would be incorrect to say that the probability that a person buys a ticket to see a Sci-Fi film is
\n\\[\\displaystyle\\frac{2}{4} = \\displaystyle\\frac{1}{2}.\\]
\nInstead we must recognise that the probability that a person buys a ticket to see a Sci-Fi film is the probability that a person buys a ticket to see either Forgotten or The Diamond Valley.
\nTherefore to calculate this probability, we add the probabilities of a person buying a ticket to see each of these films:
\n\\[
\\begin{align}
P(\\text{Sci-Fi}) &= P(\\text{Forgotten Game})+P(\\text{The Diamond Valley})\\\\
&= \\var{Avatar}+\\var{SW}\\\\
&= \\var{Avatar+SW}.
\\end{align}
\\]
Then the expected number of people who bought tickets to see a Sci-Fi film is
\n\\[
\\var{Avatar+SW} \\times \\var{no_people} = \\var{({Avatar+SW})*{no_people}}.
\\]