Understanding the Expected Value and Variance of a Bernoulli Random Variable
Introduction
In probability theory, the Bernoulli distribution is a fundamental concept that models a random experiment with only two possible outcomes: success or failure. This article delves into the calculation of the expected value and variance for a Bernoulli random variable, offering a clear and concise explanation of the underlying principles.
Defining the Bernoulli Random Variable
A Bernoulli random variable, denoted as (X), takes the value 1 with probability (p) and the value 0 with probability (q 1 - p). This distribution is a special case of the binomial distribution, often used to model binary outcomes.
Discrete Random Variable
For a discrete random variable (X), the expected value (EX) is calculated as:
[EX sum_{i} x_i P(X x_i)]
Calculating the Expected Value (EX)
For our Bernoulli random variable (X):
(X 1) with probability (p) (X 0) with probability (q 1 - p)The expected value (EX) can be computed as:
[EX 1 cdot P(X 1) 0 cdot P(X 0) 1 cdot p 0 cdot (1 - p) p]
Calculating the Variance (Var[X])
The variance of a random variable (X), denoted as (Var[X]), is defined as:
[Var[X] E[X - mu^2]]
Where (mu EX). In our case, (mu p).
Expanding and Computing the Variance
To compute the variance, we use the expanded form:
[E[X - mu^2] E[X - p^2]]
Prior to substituting, note that:
[E[X - p^2] E[X^2 - 2Xp - p^2]]
By the linearity of expectation:
[E[X - p^2] E[X^2] - 2pE[X] - E[p^2]]
Since (p^2) is a constant, (E[p^2] p^2).
Hence, we simplify:
[E[X - p^2] E[X^2] - 2p^2 - p^2 E[X^2] - p^2]
To compute (E[X^2]):
[E[X^2] 1^2 cdot P(X 1) 0^2 cdot P(X 0) 1 cdot p 0 cdot (1 - p) p]
Substituting back into the variance formula:
[E[X - p^2] p - p^2 p(1 - p) pq]
Conclusion
In conclusion, the expected value of a Bernoulli random variable (X) is (p) and the variance ((E[X - mu^2])) is given by (pq).