// Numbas version: finer_feedback_settings {"name": "Probability of scoring at basketball given probability of not scoring", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "metadata": {"description": "

Given the probability that a basketball shot misses the hoop, find the probability that it's on target - use the law of total probability.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["Hoop"], "functions": {}, "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

You are playing a game of basketball against your friend. You have the ball but your friend is blocking you from moving forwards so you throw the ball and hope that it goes through the hoop.

\n

The probability that the ball misses the hoop is $\\displaystyle \\frac{1}{\\var{Hoop}}$.

", "preamble": {"js": "", "css": ""}, "tags": ["taxonomy"], "parts": [{"correctAnswerStyle": "plain", "scripts": {}, "maxValue": "1-1/{Hoop}", "prompt": "

What is the probability that the ball goes through the hoop?

\n

Input your answer as a fraction.

", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "minValue": "1-1/{Hoop}", "allowFractions": true, "correctAnswerFraction": true, "variableReplacements": [], "mustBeReduced": false}], "rulesets": {}, "variables": {"Hoop": {"templateType": "anything", "definition": "random(5..9)", "description": "

Denominator of the fraction for the probability that the ball misses the hoop.

", "group": "Ungrouped variables", "name": "Hoop"}}, "advice": "

All probability situations can be reduced to two possible outcomes: success or failure.

\n

When we express the outcomes in this way we say that they are complementary.

\n

The sum of the probability of an event and its complement is always $1$.

\n

If $\\mathrm{P}(\\mathrm{E})$ is the probability of an event $\\mathrm{E}$ happening and $\\mathrm{P}(\\bar{\\mathrm{E}})$ is the probability of that event not happening then

\n

\\[\\mathrm{P}(\\mathrm{E}) +\\mathrm{P}(\\bar{\\mathrm{E}}) = 1.\\]

\n

Rearranging this equation gives:

\n

\\[\\mathrm{P}(\\bar{\\mathrm{E}}) = 1 - \\mathrm{P}(\\mathrm{E})\\]

\n

When we throw the ball we can say that there are two possible outcomes: either the ball goes through the hoop or the ball does not go through the hoop (the ball misses the hoop).

\n

Let $\\mathrm{H}$ be the event that the ball goes through the hoop. Then

\n

\\[\\mathrm{P}(\\mathrm{H}) + \\mathrm{P}(\\bar{\\mathrm{H}}) = 1.\\]

\n

But we are given that $\\mathrm{P}(\\bar{\\mathrm{H}}) = \\displaystyle\\frac{1}{\\var{Hoop}}$.

\n

Rearranging the above equation to obtain $\\mathrm{P}(\\mathrm{H})$.

\n

\\begin{align}
\\mathrm{P}(\\mathrm{H}) &= 1 - \\mathrm{P}(\\bar{\\mathrm{H}}) \\\\[0.5em]
&= 1 - \\displaystyle\\frac{1}{\\var{Hoop}}\\\\[0.5em]
&= \\simplify[fractionNumbers]{{1-1/{Hoop}}}.
\\end{align}

\n

", "name": "Probability of scoring at basketball given probability of not scoring", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"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": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}