07.2Binomial_Distribution_PDF
Introduction to Proportions and Probabilities
Probabilities vs. Proportions:
Probability: Refers to the true likelihood of an event occurring in the long run. It is a theoretical value, often unknown, denoted by p.
Proportion: Refers to the observed frequency of an event in a finite sample. It is an estimate of the true probability, calculated from data, often denoted by rac{X}{n} or ar{p} .
Parameter vs. Estimate: The true probability p is a population parameter, while the sample proportion rac{X}{n} is an estimate of that parameter.
Example: Murphy's Law and Toast
Scenario: Researchers investigated if toast lands butter side down. Out of 9821 slices thrown, 6101 landed butter side down.
Question: What proportion of slices landed butter side down?
Calculation: ext{Proportion} = rac{6101}{9821} hickapprox 0.6212 (or 62.12%)
This observed proportion (0.6212) is an estimate of the true underlying probability that toast lands butter side down.
Bernoulli Trials
Definition: A Bernoulli Trial (BT) is a random experiment with exactly two possible, mutually exclusive outcomes.
Characteristics:
Can be framed as a "yes or no" question.
Outcomes are typically labeled "success" and "failure."
Examples:
Is the top card of a shuffled deck an ace? (Yes/No)
Was the newborn child a girl? (Girl/Not Girl)
Did the slice of toast land butter side down? (Butter side down/Butter side up)
The Binomial Distribution: Core Concepts
General Idea: The binomial distribution describes the probability of a given number (X) of "successes" or "failures" from a fixed number of n independent trials.
Nature: It is a discrete probability distribution.
Parameters: It is defined by two parameters:
n: The total number of independent trials.
p: The probability of "success" on any single trial.
Assumptions for Binomial Distribution:
Independent: Each trial's outcome does not affect the outcome of any other trial.
Discrete: The number of successes (X) must be a whole number (e.g., 0, 1, 2, …, n).
Fixed number of trials: The number of trials n is predetermined.
Two outcomes: Each trial must have only two possible outcomes (success/failure).
Connecting to Simple Probability Rules (Example):
Assume the true probability of toast landing butter side down (p) is 0.60.
Question: If three people drop their slice of toast, what is the probability that one falls butter side down and two fall butter side up?
Hint: Draw a probability tree. Each branch would represent a slice falling butter side down (probability 0.6) or butter side up (probability 0.4).
The possible arrangements for 1 butter side down (D) out of 3 are: D-U-U, U-D-U, U-U-D.
P( ext{D-U-U}) = 0.6 imes 0.4 imes 0.4 = 0.096
P( ext{U-D-U}) = 0.4 imes 0.6 imes 0.4 = 0.096
P( ext{U-U-D}) = 0.4 imes 0.4 imes 0.6 = 0.096
The total probability is 0.096 + 0.096 + 0.096 = 0.288
This demonstrates the need for a formal way to count combinations and combine probabilities, which leads to the binomial distribution formula.
Calculating Binomial Probabilities Step-by-Step
To calculate the probability of X successes from n independent trials:
Define Success and Failure: Clearly identify what constitutes a "success" and what constitutes a "failure" in the context of the problem.
Example: For toast, "success" might be landing butter side down, "failure" is landing butter side up.
Set Up the Binomial Coefficient (Combinations): This accounts for all the different ways to get X successes in n trials.
It is read as "n choose X" and written as inom{n}{X} .
Scenario Example: If you have 5 toys (3 axolotls, 2 Labubus) and want to choose 2, how many different ways can you do it? This is a combination problem ( inom{5}{2} ).
Calculate the Binomial Coefficient: Use the factorial formula: inom{n}{X} = rac{n!}{X!(n-X)!}
Where n! (n-factorial) is the product of all positive integers up to n (n imes (n-1) imes … imes 1).
Example for inom{3}{1} : rac{3!}{1!(3-1)!} = rac{3!}{1!2!} = rac{3 imes 2 imes 1}{(1)(2 imes 1)} = rac{6}{2} = 3 . This matches the 3 arrangements (D-U-U, U-D-U, U-U-D) from the toast example.
Determine the Probability of a Specific Arrangement: This involves multiplying the probabilities of success and failure for one specific sequence of outcomes.
If p is the probability of success, then (1-p) is the probability of failure.
For X successes and (n-X) failures, the probability of one specific arrangement is p^X (1-p)^{n-X} .
Example: For D-U-U, the probability is p^1 (1-p)^2 = 0.6^1 imes 0.4^2 = 0.6 imes 0.16 = 0.096 .
Combine the Binomial Coefficient with the Probability of the Arrangement: Multiply the binomial coefficient by the probability of a specific arrangement to get the total probability of X successes. Pr[X] = inom{n}{X} p^X (1 - p)^{n-X}
This is the Binomial Probability Formula.
Example (toast): Pr[1 ext{ success}] = inom{3}{1} (0.6)^1 (0.4)^2 = 3 imes 0.6 imes 0.16 = 3 imes 0.096 = 0.288 .
Quantifying Variability of Proportions
When dealing with proportions, we can quantify their variability (how spread out they are) using variance and standard deviation.
Variance ( ext{sigma}^2 ): ext{sigma}^2 = p(1 - p) = pq
Where p is the probability of success and q = (1 - p) is the probability of failure.
Standard Deviation ( ext{sigma} ): The square root of the variance.
ext{sigma} = ext{sqrt}(p(1 - p)) = ext{sqrt}(pq)
The Binomial Test
Purpose: The binomial test is used to determine if an observed sample proportion ( rac{X}{n} ) is significantly different from a hypothesized population probability (p).
It tests the null hypothesis that the observed number of successes in n trials could have occurred by chance, given a specific underlying probability of success.
Hypotheses (H0 and HA):
Null Hypothesis (H_0): The sample aóproportion comes from a population with a probability of success equal to p. ( rac{X}{n
Introduction to Proportions and Probabilities
Probabilities vs. Proportions:
Probability (p): This refers to the true, theoretical likelihood of a specific event happening if you were to repeat an experiment an infinite number of times, or in the long run. It's a fundamental characteristic of the entire population or process, and it's almost always an unknown value we want to estimate. Think of it as the 'ideal' chance.
Proportion ( \frac{X}{n} or \bar{p} ): This is the observed frequency of an event within a finite sample of data that we've collected. It's a concrete number derived from actual observations and serves as our best estimate of the true probability (p). For example, if you flip a coin 100 times, the number of heads you get divided by 100 is your observed proportion, which estimates the true probability of getting heads (which is 0.5 for a fair coin).
Parameter vs. Estimate: The true probability p is a population parameter – an unknown, fixed value that describes the entire group or process. The sample proportion \frac{X}{n} (where X is the number of 'successes' and n is the total number of trials) is an estimate of that parameter, calculated from a subset of the population.
Example: Murphy's Law and Toast
Scenario: Researchers conducted an experiment to investigate the common belief (Murphy's Law) that toast always lands butter side down. They dropped 9821 slices of toast, and out of these, 6101 landed with the butter side down.
Question: Based on this experiment, what proportion of slices landed butter side down?
Calculation: To find the observed proportion, we divide the number of slices that landed butter side down (our 'successes') by the total number of slices dropped (our trials):
\text{Proportion} = \frac{\text{Number of butter side down}}{\text{Total slices}} = \frac{6101}{9821} \approx 0.6212
This means about 62.12% of the toast slices landed butter side down in this particular experiment.Interpretation: This observed proportion (0.6212) is our estimate of the true, underlying probability that any given slice of toast will land butter side down. We use this sample data to infer something about the general tendency of toast.
Bernoulli Trials
Definition: A Bernoulli Trial (BT) is the simplest type of random experiment. It's characterized by having exactly two possible outcomes, which are mutually exclusive (meaning both cannot happen at the same time). Each trial is independent, meaning the result of one trial doesn't influence the next.
Characteristics:
Binary Outcome: The question associated with a Bernoulli trial can always be phrased as a "yes or no" question. There are no other possibilities.
Labeled Outcomes: The two outcomes are conventionally labeled "success" and "failure." It's important to remember that "success" doesn't necessarily mean a positive or desirable result; it simply refers to the outcome we are interested in counting or observing.
Examples:
Is the top card of a shuffled deck an ace? (Yes = Success; No = Failure)
Was the newborn child a girl? (Girl = Success; Not Girl (i.e., boy) = Failure)
Did the slice of toast land butter side down? (Butter side down = Success; Butter side up = Failure)
The Binomial Distribution: Core Concepts
General Idea: The binomial distribution is a discrete probability distribution that provides a way to calculate the probability of observing a specific number (X) of "successes" or "failures" out of a fixed number (n) of independent Bernoulli trials. It helps us answer questions like: "What's the chance of getting exactly 3 heads in 5 coin flips?" or "What's the probability that 2 out of 3 patients respond to a new drug?"
Nature: It is a discrete probability distribution, meaning that the number of successes (X) can only take on whole, distinct values (e.g., 0, 1, 2, …, n); you can't have half a success.
Parameters: To fully describe a binomial distribution, you need two key parameters:
n: The total number of independent trials you are conducting. This number must be fixed and known before the experiment begins.
p: The probability of "success" on any single trial. This probability must be constant for every trial.
Assumptions for Binomial Distribution: For a situation to be modeled by a binomial distribution, it must meet four crucial assumptions:
Independent: The outcome of each trial must not influence the outcome of any other trial. For example, one coin flip doesn't change the probability of the next flip.
Discrete: The number of successes (X) must be a whole number. You can count successes, but you can't have a fraction of a success.
Fixed number of trials (n): The total number of times the experiment is performed (n) must be determined in advance and cannot change during the experiment.
Two outcomes: Each trial must have exactly two possible, mutually exclusive outcomes, conventionally labeled "success" and "failure."
Connecting to Simple Probability Rules (Example):
Let's assume the true probability of a slice of toast landing butter side down (p) is 0.60. Consequently, the probability of it landing butter side up (1-p) is 0.40. This is a Bernoulli trial.
Question: If three different people each drop one slice of toast (meaning n=3 independent trials), what is the probability that exactly one of them falls butter side down and the other two fall butter side up?
Hint: Draw a probability tree. A probability tree helps visualize all possible sequences of outcomes. For each slice, there are two branches: butter side down (D, probability 0.6) or butter side up (U, probability 0.4).
We are looking for sequences where there's exactly one 'D' and two 'U's. The possible arrangements are:
D-U-U: The first falls down, the next two fall up.
U-D-U: The first falls up, the second falls down, the third falls up.
U-U-D: The first two fall up, the third falls down.
Now, let's calculate the probability for each specific arrangement using the multiplication rule for independent events:
P(\text{D-U-U}) = P(D) \times P(U) \times P(U) = 0.6 \times 0.4 \times 0.4 = 0.096
P(\text{U-D-U}) = P(U) \times P(D) \times P(U) = 0.4 \times 0.6 \times 0.4 = 0.096
P(\text{U-U-D}) = P(U) \times P(U) \times P(D) = 0.4 \times 0.4 \times 0.6 = 0.096
Since these three arrangements are mutually exclusive ways to achieve "1 butter side down and 2 butter side up," we add their probabilities to get the total probability:
P(\text{exactly 1 success}) = 0.096 + 0.096 + 0.096 = 0.288This example illustrates that simply multiplying p^X (1-p)^{n-X} (e.g., 0.6^1 \times 0.4^2 = 0.096) only gives the probability of one specific sequence. To get the probability of exactly X successes, we also need to account for all the different ways those X successes can occur. This combinatorial aspect is where the binomial distribution formula becomes essential.
Calculating Binomial Probabilities Step-by-Step
To calculate the probability of observing exactly X successes from n independent trials, follow these steps:
Define Success and Failure: Clearly identify what outcome you are counting as a "success" and what signifies a "failure." This sets up your value for p (probability of success) and 1-p (probability of failure).
Example: For the toast problem, if we're interested in toast landing butter side down, then "success" is "landing butter side down" (p=0.6), and "failure" is "landing butter side up" (1-p=0.4).
Set Up the Binomial Coefficient (Combinations): This part of the formula accounts for all the unique ways you can arrange X successes and (n-X) failures within n trials. It's about counting the number of possible sequences, like D-U-U, U-D-U, U-U-D.
It is read aloud as "n choose X" and is mathematically written using the notation \binom{n}{X} .
Scenario Example: If you have 5 distinct toys (3 axolotls, 2 Labubus) and you want to choose any 2 of them to play with, how many different pairs of toys can you select? The order doesn't matter, so this is a combination problem ( \binom{5}{2} ). This is analogous to how the binomial coefficient works: it's counting ways to choose 'positions' for your successes.
Calculate the Binomial Coefficient: Use the factorial formula to compute the number of combinations: \binom{n}{X} = \frac{n!}{X!(n-X)!}
Where n! (read as "n-factorial") is the product of all positive integers from n down to 1 (e.g., 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120). By definition, 0! = 1.
Example for \binom{3}{1} (from toast example, 3 trials, 1 success):
\frac{3!}{1!(3-1)!} = \frac{3!}{1!2!} = \frac{3 \times 2 \times 1}{(1)(2 \times 1)} = \frac{6}{2} = 3 This calculation precisely gives us the 3 arrangements (D-U-U, U-D-U, U-U-D) we identified earlier in the toast example.
Determine the Probability of a Specific Arrangement: This step calculates the probability of one particular sequence of X successes and (n-X) failures. Since each trial is independent, we multiply their probabilities.
If p is the probability of success on a single trial, then (1-p) (often denoted as q) is the probability of failure on a single trial.
For X successes and (n-X) failures in a specific order, the probability of that one specific arrangement is given by: p^X (1-p)^{n-X} . You raise p to the power of the number of successes and (1-p) to the power of the number of failures.
Example: For the D-U-U arrangement (1 success, 2 failures), the probability is p^1 (1-p)^2 = 0.6^1 \times 0.4^2 = 0.6 \times 0.16 = 0.096 . This is the probability of that exact sequence occurring.
Combine the Binomial Coefficient with the Probability of the Arrangement: To get the total probability of exactly X successes, you multiply the number of ways to achieve X successes (the binomial coefficient) by the probability of any one of those specific arrangements. Pr[X] = \binom{n}{X} p^X (1 - p)^{n-X}
This is the Binomial Probability Formula. It states that the probability of getting exactly X successes in n trials is the number of ways to get those successes, multiplied by the probability of any one of those ways.
Example (toast): For the probability of 1 success in 3 trials:
Pr[1 \text{ success}] = \binom{3}{1} (0.6)^1 (0.4)^2 = 3 \times 0.6 \times 0.16 = 3 \times 0.096 = 0.288
This matches the sum we found when drawing the probability tree.
Quantifying Variability of Proportions
When we collect data and calculate a sample proportion, it's just one estimate. If we took another sample, we'd likely get a slightly different proportion. Quantifying this variability (how much proportions tend to spread out around the true probability) is crucial for understanding how reliable our estimate is.
Variance ( \sigma^2 ): This is a measure of how spread out the possible outcomes of a binomial process are. A larger variance means the outcomes tend to be more spread out from the mean. For a binomial proportion, the variance is calculated as: \sigma^2 = p(1 - p) = pq
Where p is the true probability of success, and q = (1 - p) is the true probability of failure. This formula specifically describes the variance of the number of successes in a single trial (a Bernoulli random variable);
Note: The variance of the sample proportion \frac{X}{n} is \frac{p(1-p)}{n} . The formula given (p(1-p)) is technically for a single Bernoulli trial, or the variance of a Binomial distribution summed for n trials (then it would be np(1-p) ).
Standard Deviation ( \sigma ): The standard deviation is the square root of the variance. It's often more intuitive than variance because it's in the same units as the data itself. It tells us the typical amount by which observations deviate from the mean. \sigma = \sqrt{p(1 - p)} = \sqrt{pq}
For the sample proportion, the standard deviation is \sqrt{\frac{p(1-p)}{n}} . This value is also known as the standard error of the proportion.
The Binomial Test
Purpose: The binomial test is a statistical hypothesis test used to determine if an observed sample proportion ( \frac{X}{n} ) is significantly different from a specific, hypothesized population probability (p). In other words, it helps us assess whether our sample results are likely to have occurred purely by chance if the true population probability were actually p.
It tests the null hypothesis that the observed number of successes (X) in n trials could reasonably have happened randomly, assuming a specific underlying probability of success (p) for each trial. If the probability of observing our sample (or something more extreme) under the null hypothesis is very low, we might reject the null hypothesis.
Hypotheses (H0 and HA): These are the formal statements used in hypothesis testing:
Null Hypothesis (H0): This is the statement that assumes there is no effect or no difference. In the context of the binomial test, it typically states that the true population probability of success (p) is equal to a specific hypothesized value (p0). For example, H0: p = p0. In the toast example, if we hypothesize that toast lands butter side down 50% of the time, H_0: p = 0.5.
Alternative Hypothesis (H_A): This is the statement that contradicts the null hypothesis and represents what we are trying to find evidence for. It can take several forms:
Two-sided: The true probability is not equal to the hypothesized value (HA: p \ne p0). For toast, H_A: p \ne 0.5.
One-sided (greater than): The true probability is greater than the hypothesized value (HA: p > p0). For toast, H_A: p > 0.5 (meaning it lands butter side down more often).
One-sided (less than): The true probability is less than the hypothesized value (HA: p < p0). For toast, H_A: p < 0.5 (meaning it lands butter side down less often).
The binomial test then calculates the probability (p-value) of observing a sample proportion as extreme as, or more extreme than, the one obtained, assuming the null hypothesis is true. If this p-value is below a predetermined significance level (e.g., 0.05), we reject H0 in favor of HA$$, concluding that the observed proportion is significantly different from the hypothesized probability.