二项分布
A binomial distribution is a probability distribution that summarizes the likelihood that a value will take one of two independent states across a number of observations or trials. It's characterized by only two possible outcomes: "success" and "failure". The binomial distribution is defined by two parameters: the number of trials \( n \) and the probability of success \( p \) in each trial.
Here are the key points about a binomial distribution:
1. **Discrete Distribution:** It is a discrete distribution, meaning it is defined only for discrete points (usually counts like 0, 1, 2, ...).
2. **Number of Trials:** It involves a fixed number of independent trials, denoted by \( n \).
3. **Two Outcomes:** Each trial has only two possible outcomes, commonly termed as "success" and "failure".
4. **Probability of Success:** The probability of success, denoted by \( p \), is the same on every trial.
5. **Independence:** The trials are independent, meaning the outcome of one trial does not affect the outcome of another.
The probability mass function (PMF) for the binomial distribution gives the probability of getting exactly \( k \) successes in \( n \) trials and is given by:
\[ P(X = k) = {n \choose k} p^k (1-p)^{n-k} \]
where \( {n \choose k} \) is the binomial coefficient, calculated as \( n! / (k!(n-k)!) \), and represents the number of ways to choose \( k \) successes from \( n \) trials.
The mean (expected value) and variance of a binomial distribution are \( np \) and \( np(1-p) \),
The variance \( \sigma^2 \) of a binomial distribution can be calculated using the formula:
\[ \sigma^2 = n \cdot p \cdot (1 - p) \]
Where:
- \( n \) is the number of trials,
- \( p \) is the probability of success on each trial,
- \( 1 - p \) is the probability of failure on each trial.
This formula comes from the fact that the binomial distribution is the sum of \( n \) independent Bernoulli trials, each with a probability \( p \) of success and \( 1-p \) of failure. The variance of each Bernoulli trial is \( p(1-p) \), and because the trials are independent, the variances add up. Thus, for \( n \) trials, the variance is \( n \cdot p \cdot (1 - p) \).
Let's first prove the variance of a single Bernoulli trial \( X_i \), where \( X_i \) can take on the value 1 with probability \( p \) (success) and the value 0 with probability \( 1-p \) (failure).
The variance of a random variable is defined as the expected value of the squared deviation from the mean, \( E[(X - \mu)^2] \), where \( \mu \) is the expected value (mean) of the random variable.
For a Bernoulli trial, the mean \( \mu \) is:
\[ \mu = E[X_i] = 1 \cdot p + 0 \cdot (1-p) = p \]
The variance \( Var(X_i) \) is:
\[ Var(X_i) = E[(X_i - \mu)^2] \]
We have two possible outcomes for \( X_i \), so we calculate the expectation by summing over these outcomes, weighted by their probabilities:
\[ Var(X_i) = (1 - p)^2 \cdot p + (0 - p)^2 \cdot (1-p) \]
\[ Var(X_i) = (1 - 2p + p^2) \cdot p + (p^2) \cdot (1-p) \]
\[ Var(X_i) = p - 2p^2 + p^3 + p^2 - p^3 \]
\[ Var(X_i) = p - p^2 \]
\[ Var(X_i) = p(1 - p) \]
This is the variance of a single Bernoulli trial \( X_i \), which shows that for a trial with two outcomes, success and failure, the variance is equal to the product of the probability of success and the probability of failure.
The variance of a binomial distribution, which is the measure of the spread or dispersion of the distribution, can be derived from its definition. Here's how you can derive the variance of a binomial distribution with \( n \) trials and probability \( p \) of success on each trial.
The binomial distribution is the sum of \( n \) independent and identically distributed Bernoulli trials, each with a success probability \( p \) and failure probability \( 1-p \). Let's denote each Bernoulli trial as \( X_i \) where \( i = 1, 2, ..., n \) and \( X_i \) can take on the value 1 with probability \( p \) (success) and the value 0 with probability \( 1-p \) (failure).
The variance of a single Bernoulli trial \( X_i \) is given by:
\[ Var(X_i) = p(1-p) \]
Since the binomial random variable \( X \) (the total number of successes in \( n \) trials) is the sum of all \( X_i \), that is:
\[ X = X_1 + X_2 + ... + X_n \]
The variance of the sum of independent random variables is equal to the sum of their variances. Therefore, the variance of \( X \), denoted as \( Var(X) \), is:
\[ Var(X) = Var(X_1 + X_2 + ... + X_n) \]
\[ Var(X) = Var(X_1) + Var(X_2) + ... + Var(X_n) \]
\[ Var(X) = n \cdot Var(X_i) \]
\[ Var(X) = n \cdot p(1-p) \]
This follows from the fact that all \( X_i \) are independent and identically distributed, so each has the same variance \( p(1-p) \). Multiplying this by the number of trials \( n \), we get the variance of the binomial distribution. This completes the proof.
PS
Certainly! To prove that the variance of a random variable \( X \) is \( Var(X) = E(X^2) - [E(X)]^2 \), we will start with the definition of variance and manipulate it to arrive at the desired formula.
The variance of a random variable \( X \) is defined as the expected value of the squared deviation of \( X \) from its mean \( \mu \):
\[ Var(X) = E[(X - \mu)^2] \]
Let's expand this expression:
\[ Var(X) = E[(X - \mu)(X - \mu)] \]
\[ Var(X) = E[X^2 - 2\mu X + \mu^2] \]
Since \( \mu \) is a constant (the expected value of \( X \)), we can take it outside of the expectation:
\[ Var(X) = E[X^2] - 2\mu E[X] + \mu^2 \]
Now, recall that \( \mu = E[X] \), so the equation simplifies to:
\[ Var(X) = E[X^2] - 2E[X]E[X] + [E(X)]^2 \]
\[ Var(X) = E[X^2] - 2[E(X)]^2 + [E(X)]^2 \]
Combining the last two terms, which are both involving \( [E(X)]^2 \), we get:
\[ Var(X) = E[X^2] - [E(X)]^2 \]
And this is the formula for the variance of a random variable \( X \), showing that it is equal to the expected value of the square of \( X \) minus the square of the expected value of \( X \).