1.3.5 · D4Probability & Statistics

Exercises — Random variables (discrete and continuous)

1,783 words8 min readBack to topic

This is a self-test ladder. Each problem climbs one rung of difficulty: L1 RecognitionL2 ApplicationL3 AnalysisL4 SynthesisL5 Mastery.

Try each on your own first, then open the collapsible solution. Every symbol used here was built in the parent note Random Variables — if a term feels unfamiliar, that note defines it from zero.

Figure — Random variables (discrete and continuous)

L1 — Recognition

Problem 1.1

A fair six-sided die is rolled once. Let be the number of dots showing. Is discrete or continuous, and what is ?

Recall Solution

Type. The outcomes are — a finite countable set. So is discrete.

Probability. A fair die means all six faces are equally likely, so each has probability . Therefore Check the PMF is valid: ✓ (normalization holds).

Problem 1.2

The waiting time (in minutes) for a bus is described by a PDF . A student writes "". True or false, and why?

Recall Solution

False. For a continuous random variable, the probability of any single exact value is : The function is a density (probability per unit time), not a probability. To get a real probability you must integrate over an interval, e.g. .


L2 — Application

Problem 2.1

A biased coin has . Let for heads, for tails (a Bernoulli RV). Compute .

Recall Solution

Using : This matches the parent note's result . See Bernoulli and Categorical Distributions.

Problem 2.2

Flip that same coin () times independently. Let = number of heads (Binomial). Find and .

Recall Solution

PMF. . With , , : Mean. Each flip contributes , and expectation adds over independent parts:

Problem 2.3

. Find the PDF value and .

Recall Solution

Density. On , for every in the interval, so . Probability = area. The region under a flat line is a rectangle of height and width :

Figure — Random variables (discrete and continuous)

L3 — Analysis

Problem 3.1

. Derive its variance from first principles, then evaluate for .

Recall Solution

Definition. (see Expectation and Variance). Compute : Factor : Subtract : Evaluate for :

Problem 3.2

Let where is the Bernoulli RV with (so ). Find and .

Recall Solution

Linearity of expectation: Variance under linear scaling: adding a constant shifts values but never changes spread, and multiplying by stretches deviations by , so variance scales by : For Bernoulli, , so


L4 — Synthesis

Problem 4.1

A continuous RV has PDF for and elsewhere. (a) Find . (b) Find . (c) Find .

Recall Solution

(a) Normalize. A valid PDF integrates to : (b) Expected value. The mean sits past the midpoint () because density grows toward the right — more probability mass lives at larger . (c) CDF-style probability.

Figure — Random variables (discrete and continuous)

Problem 4.2

You observe independent Bernoulli trials, all successes (). Using Maximum Likelihood, estimate . Then note why this is a warning sign. (See Maximum Likelihood Estimation.)

Recall Solution

Likelihood. For Bernoulli data, . With all five : Maximize. Take the log (monotone, easier): . Differentiate and set to zero: This has no interior solution; is increasing on , so the maximum is at the boundary . In general . Warning. claims failure is impossible — obviously overconfident from only 5 flips. This is why we regularize / use priors in practice.


L5 — Mastery

Problem 5.1

Let (Gaussian, Gaussian Distribution). Define the standardized variable . Show and , then use to state .

Recall Solution

Mean of . By linearity, Variance of . Subtracting a constant doesn't change spread; dividing by scales variance by : So , the standard normal. Interval translation. The event is exactly the event (multiply through by , add ). Since the linear map is a bijection, probabilities are preserved: This is the famous "68% within one standard deviation" rule.

Problem 5.2

Let be i.i.d. with mean and variance . Let . Show and . Evaluate for , , and connect to the Central Limit Theorem.

Recall Solution

Mean. Linearity of expectation: The sample mean is unbiased. Variance. For independent variables, variances add, and the factor pulls out squared: Evaluate. , so the standard error is . CLT link. As grows, : averages concentrate around . The CLT sharpens this — becomes approximately regardless of the original distribution's shape.


Self-check recall

Bernoulli mean with
Binomial mean,
Uniform variance
Effect of
(shift irrelevant)
Variance of sample mean of i.i.d.
Why for continuous
probability is area, and an interval of zero width has zero area