Go to the RMD, R, PDF, or HTML version of this file. Go back to fan’s REconTools Package, R Code Examples Repository (bookdown site), or Intro Stats with R Repository (bookdown site).
In Sample Space, Experimental Outcomes, Events, Probabilities, we discussed various definitions. We studied various examples in Examples of Sample Space and Probabilities.
In the example below, we have a multiple-step experiment: “If an experiment can be describe as a sequence of \(n\) steps with \(m\) possible outcomes on each step, then the total number of experimental outcomes is \(m^n\).” (ASWCC P172) You can use letters other than \(n\) and \(m\) as well.
Key questions:
We are thinking about the problem from day zero perspective. We could play the lottery three times, on day one, day two and day three.
Suppose you can either win or lose when you play the lottery. Each lottery ticket costs the same. You will buy 1 lottery ticket on each day for three days straight. The chance of winning is the same for each lottery ticket (perhaps the number of people buying lottery is the same every day). You see at the end of each day whether you won or lost.
The question is, what are the possible outcomes after three days? You are standing from the perspective of today, looking forward to what could happen tomorrow, two days from now, three days from now.
Assumptions
Based on the descriptions above, we can write down the following assumptions we are making, which are also the assumptions for the binomial distribution:
Symbols we will use
The Tree Structure with Probability Written on it, Notations:
From day zero perspective, by the end of day one, there are two possible experimental outcomes, with different probabilities associated with each outcome.
There are two experimental outcomes in the sample space: \[\Sigma_{i=1}^2 \left(P\left(E_i\right)\right) = p + \left(1-p\right) = 1\]
From day zero perspective, by the end of day two, there are four possible experimental outcomes, with different probabilities associated with each outcome.
We are assuming that each lottery play is independent, we learned before that:
\[ P(A \cap B) = P (A \mid B)\cdot P(B)\]
and when \(A\) and \(B\) are independent:
\[ P(A \cap B) = P (A)\cdot P(B)\]
There are four experimental outcomes in the sample space:
\[\begin{align} \Sigma_{i=1}^4 \left(P\left(E_i\right)\right) =& p \cdot p + p \cdot (1-p) + (1-p) \cdot p + (1-p) \cdot (1-p)\\ =& p \cdot (p + 1 - p) + (1-p) \cdot (p + 1 - p) \\ =& p + (1-p) \\ =& 1 \\ \end{align}\]
From day zero perspective, by the end of day three, there are eight possible experimental outcomes, with different probabilities associated with each outcome.
There are eight experimental outcomes in the sample space, and they sum up to one as before:
\[\begin{align} \Sigma_{i=1}^8 \left(P\left(E_i\right)\right) = 1 \\ \end{align}\]
Generally, after \(n\) trials/lotteries, if a particular experimental outcome had \(x\) number of wins/successes (which means \(n-x\) number of losses/failures), the probability that this particular experimental outcome happen is: \[ p^x \cdot p^{n-x} \]
The probabilities we wrote in the previous examples all follow this rule. Remember that if someone won every time, \(n=x\), and we will have \(p^x \cdot p^{n-x}=p^x \cdot p^0 = p^x \cdot 1 = p^x\).
So far we have discussed different experimental outcomes with unique sequences of wins and losses. In the 3 lottery example above, we have 8 experimental outcomes. If we are mainly interested in the total number of wins and losses, we can group these 8 experimental outcomes into 4 events.
These four events are mutually exclusive and jointly exhaustive, we can define a new sample space that includes four experimental outcomes, win zero times, win once, win twice, win three times.