 # Bernoulli Sequences

If an experiment has only two possible outcomes and each trial is independent, then the trials follow a Bernoulli sequence.
Two possible outcomes does not necessarily mean that there are only two results in the sample space. For example, when rolling a six sided dice, we may be interested in the number of sixes rolled. Thus, we could look at two events - rolling a six and not rolling a six. This would follow a Bernoulli sequence.

# Binomial Probability Distributions

The binomial random variable, X, is the number of successes in a Bernoulli sequence of n trials. A binomial distribution is defined by the rule: $\Pr(X=x) = \binom{n}{x} \cdot p^x \cdot (1-p)^{n-x}$ $$n$$ is the number of trials}
$$p$$ is the probability of success
$$x$$ is the number of successes

$\binom{n}{x} = \,^nC_{x} = \frac{n!}{x!(n-x)!} = \text{number of different orders the successes and failures can occur.}$
The rule for the binomial probability distribution is cumbersome. The CAS calculator is programmed with the command $$binomPdf(n,p,x)$$ and $$binomCdf(n,p,x_l, x_u)$$. However, calculator syntax should never be used in your solutions. Instead simply write: $X \sim \text{ Bi}(n,p) \text{ to indicate that }X\text{ is a binomial random variable.}$

To calculate $$\Pr(X=x)$$ use $$binomPdf(n,p,x)$$
To calculate $$\Pr(x_l \leqslant X \leqslant x_u)$$ use $$binomCdf(n,p,x_l, x_u)$$
To calculate $$\Pr(x_l < X < x_u)$$ use $$binomCdf(n,p,x_l+1, x_u-1)$$

The binomCdf function will include the lower and upper bounds you provide, thus, if you want to find the probability of something which does not include the bounds, simply add one to the lower bound or subtract one from the upper bound when appropriate.

\text{Example 10.1. There are 8 balls in a bag. 3 of the balls are red and 5}\\\text{ of the balls are yellow. If 2 balls are selected, }\\ \text{what is the probability that the number of red balls selected is 0?}\\\text{ What is the probability that at least one red ball is selected?} \\ \text{ }\\ \text{Let } X \text{ be the number of red balls selected}\\ X \sim \text{ Bi}(2, \frac{3}{8}) \\ \begin{aligned} \Pr(X = 0) &= \binom{2}{0} \cdot (\frac{3}{8})^0 \cdot (1-\frac{3}{8})^{2-0} \\ &= \frac{2!}{2! \cdot (2-2)!} \cdot 1 \cdot (\frac{5}{8})^2) \\ &= 1 \cdot 1 \cdot \frac{25}{64} \\ &= \frac{25}{64}\\ \end{aligned}\\ \text{The probability that no red balls are selected is } \frac{25}{64}\\ \text{ }\\ \begin{aligned} \Pr(X \geqslant 0) &= 1 - \Pr(x = 0) \\ &= 1 - \frac{25}{64} \\ &= \frac{39}{64} \end{aligned}\\ \text{The probability that at least one red ball is selected is } \frac{39}{64}

$\text{Example 10.2: The probability that a certain basketball player scores a free throw is 0.65}\\\text{ and each shot can be considered to be independent of any other.} \\ \text{If he has 10 shots find the probability the he scores: } \\ \text{ } \\ \text{Let } X \text{ be the number of free throws scored} \\ X \sim \text{ Bi}(10,0.65)$

 Question Calculator command Answer (correct to 3 d.p) Exactly 8 shots $binomPdf(10,0.65,8)$ $0.176$ Less than 8 shots $binomCdf(10,0.65,0,7)$ $0.738$ At least 8 shots $binomCdf(10,0.65,8,10)$ $0.262$ More than 8 shots $binomCdf(10,0.65,9,10)$ $0.086$ The first 8 shots only* $0.65^8 \cdot 0.35^2$ $0.004$ At least 8 shots given that he did not score all 10 $\frac{binomCdf(10,0.65,8,9)}{binomCdf(10,0.65,0,9)}$ $0.252$

* There is only one way of doing this, that is 8 successful shots, followed by 2 missed shots.

# Graphs of Binomial Distributions

The graphs of binomial distributions involve the plotting of multiple points. The x-axis represents the variable and the y-axis represents the probability. The shape of the graphs can be described in three ways: positively skewed, symmetrical and negatively skewed. A positively skewed graph has a low value for $$p$$. A symmetrical graph will have a $$p$$ value of 0.5. A negatively skewed graph has a high value for $$p$$. Examples of each type of graph is shown below. $n = 6,\, p = 0.2 \text{; positively skewed}$ $n = 6,\, p = 0.5 \text{; symmetrical}$ $n = 6,\, p = 0.8 \text{; negatively skewed}$

# Mean, Variance and Standard Deviation

Calculating the mean, variance and standard deviation is significantly easier compared to the previous chapter. $E(X) = n \cdot p$ $Var(X) = n \cdot p \cdot (1-p)$ $sd(X) = \sqrt{Var(X)}$

\text{Example 10.3: A binomial random variable } X \\\text{ has mean 12 and variance 9. Find the parameters } n \text{ and } p.\\ \text{ } \\ \text{ } \\ \begin{aligned} E(X) &= 12\\ n \cdot p &= 12 ... \boxed{1}\\ \text{ }\\ Var(X) &= 9\\ n \cdot p \cdot (1-p) &= 9 ... \boxed{2}\\ \end{aligned}\\ \text{ }\\ \text{Substitute } \boxed{1} \text{ into } \boxed{2}\\ \begin{aligned} 12 \cdot (1-p) &= 9\\ 1-p &= \frac{9}{12}\\ 1-p &= \frac{3}{4}\\ -p &= -\frac{1}{4}\\ p &= \frac{1}{4}\\ \text{ }\\ \text{Substitute } p &= \frac{1}{4} \text{ into } \boxed{1}\\ n \cdot \frac{1}{4} &= 12\\ n &= 12 \div \frac{1}{4}\\ &=48\\ n = 48 &\text{ and } p = \frac{1}{4}\\ \end{aligned}\\

# Finding the Sample Size

A common VCE question. An example is provided below.

\text{Example 10.4: The probability that a certain basketball player scores a free throw is 0.65.}\\ \text{Each throw can be considered to be independent of any other.}\\ \text{How many shots would the basketball player require to}\\\text{ ensure at least a 0.9 chance of scoring 2 free throws}\\ \text{ } \\ \text{ } \\ \text{Let } X \text{ be the number of free throws which the player scores}\\ X \sim \text{ Bi}(n, 0.65)\\ \begin{aligned} \Pr(X \geqslant 2) &\geqslant 0.9\\ 1-\Pr(X=0) - \Pr(X=1) &\geqslant 0.9\\ \Pr(X=0) + \Pr(X=1) &\leqslant 0.1\\ \binom{n}{0} \cdot 0.65^0 \cdot 0.35^n + \binom{n}{1} \cdot 0.65^1 \cdot 0.35^{(n-1)} &\leqslant 0.1\\ 0.35^n + n \cdot 0.65 \cdot 0.35^{(n-1)} &\leqslant 0.1\\ \end{aligned}\\ \text{ }\\ \text{Solve } 0.35^n + n \cdot 0.65 \cdot 0.35^{n-1} = 0.1 \text{ (In your CAS calculator)}\\ \text{ }\\ \begin{aligned} n &= -0.506… , 4.28…\\ n &= -0.506...\text{ is disregarded as the number of shots must be positive}\\ n &= 4.28…\text{ must be rounded up as we required the minimum number of}\\ &\text{ shots to be taken score at least 2 shots. Thus, the minimum number of shots required is 5} \end{aligned}\\