13 Problems Solved
Classify the following random variables as discrete or continuous: (a) Number of items in a batch. (b) Weight of a cereal box. (c) Number of phone calls per hour. (d) Temperature in a room. (e) Time spent waiting for a bus.
Identify whether the random variable outcomes are countable or fall on a continuous scale.
These are Discrete as they represent counts.
These are Continuous as they represent physical measurements.
Testing if the sum of two discrete variables is always discrete (Yes).
Find the PMF from this CDF: \( F(x) = 0 \) for \( x < 0 \); \( 0.2 \) for \( 0 \le x < 1 \); \( 0.5 \) for \( 1 \le x < 2 \); \( 0.8 \) for \( 2 \le x < 3 \); \( 1 \) for \( x \ge 3 \).
PMF at x is the jump size in CDF at x: \( P(X=x) = F(x) - F(x^-) \).
In a discrete distribution, the CDF is a step function. The probability at a point is the "height of the step" at that location.
Verification Check: \( 0.2 + 0.3 + 0.3 + 0.2 = 1.0 \). Valid PMF.
For a fair coin tossed twice, find \( E[X] \) and \( Var(X) \) where X is the number of heads.
PMF: \( P(0)=0.25, P(1)=0.5, P(2)=0.25 \).
\( E[X] = \sum x P(x) \)
\( Var(X) = E[X^2] - (E[X])^2 \)
\( E[X] = 0(0.25) + 1(0.5) + 2(0.25) = 1.0 \)
\( E[X^2] = 0^2(0.25) + 1^2(0.5) + 2^2(0.25) = 1.5 \)
\( Var(X) = 1.5 - (1)^2 = 0.5 \)
Prove that for any random variable X, \( E[X^2] \ge (E[X])^2 \). When does equality hold?
Think about the physical meaning of variance. Can it be negative?
The squared difference from the mean \( (X - \mu)^2 \) is always non-negative. Therefore, its average (Mean Squared Deviation) must be non-negative.
Let \( \mu = E[X] \). Consider the variance:
\( Var(X) = E[(X - \mu)^2] \)
Because \( (X - \mu)^2 \ge 0 \) for any real value of X, the expectation of this non-negative variable must be \( \ge 0 \).
\( E[X^2 - 2X\mu + \mu^2] \ge 0 \)
\( E[X^2] - 2\mu E[X] + \mu^2 \ge 0 \)
\( E[X^2] - 2\mu^2 + \mu^2 \ge 0 \implies E[X^2] - \mu^2 \ge 0 \)
\( E[X^2] \ge (E[X])^2 \)
Equality: Holds when \( Var(X) = 0 \), which implies X is a constant.
Find c such that \( f(x) = cx^2 \) for \( 0 < x < 3 \) is a PDF. Calculate \( P(X> 1) \).
This problem asks for two things:
For any valid PDF \( f(x) \):
The probability that \( X \) falls in an interval [a, b] is:
We set the total area under the curve to 1:
\( \int_{0}^{3} cx^2 dx = 1 \)
\( c [x^3/3]_0^3 = 1 \)
\( c [27/3 - 0] = 1 \implies 9c = 1 \implies c = 1/9 \).
Since the variable only exists up to 3:
\( P(X > 1) = \int_1^3 \frac{1}{9}x^2 dx \)
\( = \frac{1}{9} [x^3/3]_1^3 = \frac{1}{27}(3^3 - 1^3) = \frac{1}{27}(27-1) = 26/27 \).
Result: \( 26/27 \approx 0.963 \).
The time between arrivals at a service desk follows an exponential distribution with mean 10 minutes. Find the probability that the next arrival takes more than 15 minutes.
Given the average (mean) waiting time is 10 minutes, what is the likelihood that you'll have to wait longer than 15 minutes for the next person to arrive?
PDF: \( f(x) = \lambda e^{-\lambda x} \) for \( x \ge 0 \)
Relationship: \( E[X] = 1/\lambda \)
Instead of integrating the PDF repeatedly, remember that the probability of "more than x" is:
Given Mean (\( \mu \)) = 10 minutes.
Since \( \mu = 1/\lambda \), we have \( 10 = 1/\lambda \implies \lambda = 0.1 \) per minute.
Using the survival function:
\( P(X > 15) = e^{-\lambda \cdot 15} \)
\( = e^{-0.1 \times 15} = e^{-1.5} \)
Calculating the value: \( e^{-1.5} \approx 0.2231 \).
Result: Roughly 22.3% chance of waiting over 15 minutes.
Show that the expected value of a Poisson random variable with parameter \( \lambda \) is \( \lambda \).
Prove mathematically that if \( X \sim \text{Poisson}(\lambda) \), then its mean (average value) is exactly the parameter \( \lambda \).
The exponential function can be written as a series:
\( E[X] = \sum_{x=0}^{\infty} x \frac{e^{-\lambda} \lambda^x}{x!} \)
The \( x=0 \) term is 0, so we start the sum at \( x=1 \).
Note that \( x/x! = 1/(x-1)! \)
\( E[X] = e^{-\lambda} \sum_{x=1}^{\infty} \frac{\lambda^x}{(x-1)!} \)
Let \( k = x-1 \). As \( x \) goes from 1 to \( \infty \), \( k \) goes from 0 to \( \infty \).
\( E[X] = \lambda e^{-\lambda} \sum_{k=0}^{\infty} \frac{\lambda^{k}}{k!} \)
The sum is exactly \( e^\lambda \).
Therefore, \( E[X] = \lambda e^{-\lambda} (e^\lambda) = \lambda \cdot e^0 = \lambda \).
If X is exponentially distributed with parameter \( \lambda \), prove that \( P(X > s+t | X > s) = P(X > t) \).
This is a formal proof of the "Memoryless Property." It asks you to show that given a process has already lasted \( s \) units of time, the probability it lasts for at least \( t \) more units is the same as the probability it would last \( t \) units starting from scratch.
For the exponential distribution:
If \( X > s+t \), then \( X \) is surely greater than \( s \) (since \( t > 0 \)).
Therefore, \( (X > s+t) \cap (X > s) \) is simply the event \( X > s+t \).
\( P(X > s+t | X > s) = \frac{P(X > s+t)}{P(X > s)} \)
\( = \frac{e^{-\lambda(s+t)}}{e^{-\lambda s}} \)
\( = \frac{e^{-\lambda s} \cdot e^{-\lambda t}}{e^{-\lambda s}} \)
\( = e^{-\lambda t} \)
This is exactly \( P(X > t) \). Proof complete.
Explain the relationship between Bernoulli and Binomial random variables. How do their expectations relate?
The problem asks for an explanation of how these two distributions are connected and a derivation of the Binomial mean using Bernoulli trials.
Outcomes: 1 (success) with prob \( p \), 0 (failure) with prob \( 1-p \).
\( E[X_i] = 1(p) + 0(1-p) = p \).
Definition: The sum of \( n \) independent and identically distributed (i.i.d.) Bernoulli(p) trials.
A Binomial distribution models the number of successes in a fixed number of independent Bernoulli trials, each with the same probability of success \( p \).
Let \( X_1, X_2, \dots, X_n \) be Bernoulli trials.
The total number of successes is \( X = X_1 + X_2 + \dots + X_n \).
By the Linearity of Expectation:
\( E[X] = E[X_1 + X_2 + \dots + X_n] \)
\( = E[X_1] + E[X_2] + \dots + E[X_n] \)
\( = p + p + \dots + p \) (total of \( n \) terms)
\( = np \).
Let X follow a discrete uniform distribution on the set {1, 2, ..., n}. Find its mean.
Find the average value (mathematical expectation) of a random variable that can take any integer from 1 to \( n \) with equal probability.
Sum of sequence: \( \sum_{i=1}^n i = \frac{n(n+1)}{2} \)
\( E[X] = \sum_{x=1}^n x \cdot P(X=x) \)
\( E[X] = \sum_{x=1}^n x \cdot \frac{1}{n} \)
Factor out the constant \( 1/n \):
\( E[X] = \frac{1}{n} \sum_{x=1}^n x \)
Substitute the sum formula:
\( E[X] = \frac{1}{n} \cdot \frac{n(n+1)}{2} \)
\( E[X] = \frac{n+1}{2} \).
A hunter has a probability of 0.4 of hitting a bird. He shoots until he hits it. Find the expected number of shots.
The problem asks for the average (expected) number of trials needed to achieve the first success, given each trial is independent and has a 40% success rate.
Models the number of trials \( X \) until the first success.
PMF: \( P(X=x) = q^{x-1}p \) for \( x = 1, 2, \dots \)
Success probability \( p = 0.4 \).
Failure probability \( q = 1 - 0.4 = 0.6 \).
For trials until first success:
\( E[X] = 1/p \)
\( E[X] = 1/0.4 = 2.5 \).
On average, the hunter will need 2.5 shots to hit the bird.
Derive the MGF of an exponential random variable with parameter \( \lambda \).
Mathematically derive the Moment Generating Function (MGF) for the exponential distribution from first principles (integration).
The MGF only exists if the expected value is finite. For exponential, this requires the damping factor in the integral to be negative.
\( M_X(t) = \int_0^{\infty} e^{tx} \left( \lambda e^{-\lambda x} \right) dx \)
\( M_X(t) = \lambda \int_0^{\infty} e^{(t-\lambda)x} dx \)
This integral converges if and only if \( t < \lambda \).
\( M_X(t) = \lambda \left[ \frac{e^{(t-\lambda)x}}{t-\lambda} \right]_0^{\infty} \)
Evaluated at \( \infty \): Since \( t-\lambda < 0 \), the term goes to 0.
Evaluated at \( 0 \): \( e^0 / (t-\lambda) = 1/(t-\lambda) \).
\( M_X(t) = \lambda \left[ 0 - \frac{1}{t-\lambda} \right] = -\frac{\lambda}{t-\lambda} = \frac{\lambda}{\lambda - t} \).
Find a lower bound for \( P(|X-\mu| < 3\sigma) \) using Chebyshev's inequality.
Regardless of the distribution, find the minimum probability that a random variable falls within 3 standard deviations of its mean.
This holds for ANY random variable with finite mean and variance.
The question asks for the bound within \( 3\sigma \). So, \( k = 3 \).
Lower bound = \( 1 - 1/k^2 \)
\( = 1 - 1/3^2 \)
\( = 1 - 1/9 = 8/9 \).
\( 8/9 \approx 0.8889 \).
Conclusion: At least 88.89% of outcomes fall within 3 standard deviations of the mean.