STA 260.1 · Introduction to Probability and Statistics
Our notes
2 min readExpectation (mean)
- Discrete: E(X) = Σ x p(x).
- Continuous: E(X) = ∫ x f(x) dx.
It is the long-run average value. For any function g, E[g(X)] = Σ g(x) p(x) (or the integral).
Rules
- E(aX + b) = a E(X) + b.
- E(X + Y) = E(X) + E(Y), always (independent or not).
- If X and Y are independent, E(XY) = E(X) E(Y).
Variance and standard deviation
Var(X) = E[(X − μ)²] = E(X²) − [E(X)]², and SD = √Var.
- Var(aX + b) = a² Var(X) (adding a constant does not change spread).
- Var(X + Y) = Var(X) + Var(Y) + 2 Cov(X, Y); for independent X, Y the covariance is 0.
- Var(X − Y) = Var(X) + Var(Y) for independent X, Y (variances add even when you subtract).
Worked example
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| p(x) | 0.1 | 0.3 | 0.4 | 0.2 |
E(X) = 0 + 0.3 + 0.8 + 0.6 = 1.7.
E(X²) = 0 + 0.3 + 1.6 + 1.8 = 3.7.
Var(X) = 3.7 − 1.7² = 3.7 − 2.89 = 0.81, SD = 0.9.
Check directly: Σ (x − 1.7)² p(x) = 2.89(0.1) + 0.49(0.3) + 0.09(0.4) + 1.69(0.2) = 0.289 + 0.147 + 0.036 + 0.338 = 0.81. ✓
If Y = 3X − 2: E(Y) = 3.1, Var(Y) = 9 × 0.81 = 7.29.
Moments
- r-th moment about the origin: μ′ᵣ = E(Xʳ).
- r-th moment about the mean: μᵣ = E[(X − μ)ʳ]. μ₂ is the variance.
- Skewness uses μ₃/σ³ (0 for a symmetric distribution); kurtosis uses μ₄/σ⁴ (3 for the normal).
Moment generating function
M(t) = E(e^{tX}). Its derivatives at t = 0 give the moments: M′(0) = E(X), M″(0) = E(X²).
Example: for the exponential with rate λ, M(t) = λ/(λ − t) for t < λ; M′(0) = 1/λ, M″(0) = 2/λ², so Var = 2/λ² − 1/λ² = 1/λ².
Two variables with the same MGF have the same distribution, and the MGF of a sum of independent variables is the product of their MGFs: this is how the CLT is usually proved.
Exams usually ask
- E(X) and Var(X) from a table or a pdf.
- Use the rules for aX + b and sums.
- Find moments from an MGF.
Common mistake
Writing Var(X − Y) = Var(X) − Var(Y). For independent variables the variances always add.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Introductory Statistics 2e, 4.2 Mean or Expected Value and Standard Deviation
(opens openstax.org in a new tab)
OpenStax, Introductory Statistics 2e, 4.2 Mean or Expected Value and Standard Deviation, CC BY-NC-SA 4.0 · licence
-
Expected value
(opens en.wikipedia.org in a new tab)
Wikipedia, Expected value, CC BY-SA 4.0 · licence
-
Variance
(opens en.wikipedia.org in a new tab)
Wikipedia, Variance, CC BY-SA 4.0 · licence
-
Moment generating function
(opens en.wikipedia.org in a new tab)
Wikipedia, Moment generating function, CC BY-SA 4.0 · licence
-
OpenStax, Introductory Statistics 2e (whole free textbook)
The whole book, free to read online or download as a PDF (the PDF is large: Wi-Fi).
(opens openstax.org in a new tab)
OpenStax, OpenStax, Introductory Statistics 2e (whole free textbook), CC BY-NC-SA 4.0 · licence
Watch
-
Mean (expected value) of a discrete random variable | AP Statistics | Khan Academy
5 min · ≈ 23 MB · about ₦13
(opens youtube.com in a new tab)
-
The Expected Value (Mean) of a Probability Distribution
15 min · ≈ 68 MB · about ₦38
(opens youtube.com in a new tab)
-
How To Calculate Expected Value
7 min · ≈ 32 MB · about ₦18
(opens youtube.com in a new tab)
-
What is a Moment Generating Function (MGF)? ("Best explanation on YouTube")
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
-
Lec 4: Moments: mean and variance
32 min · ≈ 144 MB · about ₦81
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.