Combined pdf shivi

📚 Combined pdf shivi.pdf

Brief overview

This document provides a comprehensive exploration of probability and statistical concepts. It details the behavior of random variables, the properties of distributions, and methods for analyzing relationships between variables, forming a foundation for statistical reasoning.

Key points

  • Overview of continuous random variables and their statistical properties
  • Understanding the normal distribution and its standard form
  • Exploring joint distributions and linear regression analysis
  • Mechanisms of sampling distributions and the Central Limit Theorem
  • Fundamentals of statistical inference, estimation, and hypothesis testing

1. Continuous random variables

1.1 Probability density and cumulative distribution functions

  • A probability density function (PDF), denoted f(x)f(x), describes the relative likelihood for a continuous random variable to take on a given value.
  • For any PDF, two conditions must hold:
    • f(x)≥0f(x) \ge 0 for all xx.
    • The total area under the curve must be 1: ∫−∞∞f(x)dx=1\int_{-\infty}^{\infty} f(x) dx = 1.
  • The probability that a continuous random variable XX falls between aa and bb is given by the integral of its PDF: P(a≤X≤b)=∫abf(x)dxP(a \le X \le b) = \int_{a}^{b} f(x) dx.

The PDF is not probability; it's a density. Probability is the area under the PDF curve.

  • A cumulative distribution function (CDF), denoted F(x)F(x), gives the probability that a random variable is less than or equal to a specific value.
  • The CDF is calculated by integrating the PDF from negative infinity up to xx: F(x)=P(X≤x)=∫−∞xf(t)dtF(x) = P(X \le x) = \int_{-\infty}^{x} f(t) dt.
  • The CDF is always non-decreasing and ranges from 0 to 1.
PropertyDescription
MonotonicityF(x)F(x) is non-decreasing.
Limitslim⁡x→−∞F(x)=0\lim_{x \to -\infty} F(x) = 0, lim⁡x→∞F(x)=1\lim_{x \to \infty} F(x) = 1.
ProbabilityP(a<X≤b)=F(b)−F(a)P(a < X \le b) = F(b) - F(a).
Non-negativityF(x)≥0F(x) \ge 0 for all xx.

1.2 Expected value, mean, and variance

  • The expected value of a function H(X)H(X) of a continuous random variable XX is calculated by integrating H(x)H(x) multiplied by the PDF: E[H(X)]=∫−∞∞H(x)f(x)dxE[H(X)] = \int_{-\infty}^{\infty} H(x) f(x) dx. This integral must converge absolutely.

Expected value is the weighted average of possible values, where weights are given by the PDF.

  • The mean of a continuous random variable XX is its expected value, often denoted by μ\mu: μ=E[X=∫−∞∞xf(x)dx\mu = E[X = \int_{-\infty}^{\infty} x f(x) dx.
  • The variance of XX, denoted σ2\sigma^2, measures the spread of the distribution around the mean. It is calculated as: σ2=E[(X−μ)2=∫−∞∞(x−μ)2f(x)dx\sigma^2 = E[(X - \mu)^2 = \int_{-\infty}^{\infty} (x - \mu)^2 f(x) dx.
  • A useful computational formula for variance is: σ2=E[X2−(E[X])2\sigma^2 = E[X^2 - (E[X])^2.
  • The standard deviation, σ\sigma, is the positive square root of the variance.
ConceptFormula
Mean (μ\mu)E[X=∫−∞∞xf(x)dxE[X = \int_{-\infty}^{\infty} x f(x) dx
Variance (σ2\sigma^2)E[(X−μ)2=∫−∞∞(x−μ)2f(x)dxE[(X - \mu)^2 = \int_{-\infty}^{\infty} (x - \mu)^2 f(x) dx
Variance (Comp.)E[X2−(E[X])2E[X^2 - (E[X])^2
Standard Deviationσ=σ2\sigma = \sqrt{\sigma^2}

1.2.1 Calculating mean and variance

📝 Example: Given a PDF f(x)=32x2f(x) = \frac{3}{2}x^2 for 0<x<10 < x < 1, find the mean and variance.

  • Mean calculation:

    • μ=E[X=∫01x(32x2)dx=∫0132x3dx=32[x44]01=38\mu = E[X = \int_{0}^{1} x \left(\frac{3}{2}x^2\right) dx = \int_{0}^{1} \frac{3}{2}x^3 dx = \frac{3}{2} \left[\frac{x^4}{4}\right]_0^1 = \frac{3}{8}.
  • Variance calculation:

    • First, calculate E[X2=∫01x2(32x2)dx=∫0132x4dx=32[x55]01=310E[X^2 = \int_{0}^{1} x^2 \left(\frac{3}{2}x^2\right) dx = \int_{0}^{1} \frac{3}{2}x^4 dx = \frac{3}{2} \left[\frac{x^5}{5}\right]_0^1 = \frac{3}{10}.
    • Then, σ2=E[X2−(E[X])2=310−(38)2=310−964=96−90320=6320=3160\sigma^2 = E[X^2 - (E[X])^2 = \frac{3}{10} - \left(\frac{3}{8}\right)^2 = \frac{3}{10} - \frac{9}{64} = \frac{96 - 90}{320} = \frac{6}{320} = \frac{3}{160}.
    • The standard deviation is σ=3160\sigma = \sqrt{\frac{3}{160}}.

🔑 Important: Always ensure the PDF integrates to 1 before calculating mean and variance. If it doesn't, you need to find the normalizing constant first.


🔑 Important: For continuous random variables, the expected value, mean, and variance are calculated using integrals of the probability density function (PDF), allowing for a continuous range of outcomes.

2. Normal distribution and its properties (part 1)

2.1 Introduction to the normal distribution

  • Normal distribution (also called Gaussian distribution) is a key probability distribution.
  • It is defined by a probability density function (PDF) with two parameters: the mean μ\mu and the variance σ2\sigma^2.
    • The formula for the PDF is: f(x;μ,σ2)=1σ2πe−(x−μ)22σ2f(x; \mu, \sigma^2) = \frac{1}{\sigma \sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} for −∞<x<∞-\infty < x < \infty.

2.2 Properties of the normal distribution

  • The total area under the PDF curve is always 1.
  • The distribution is centered at its mean, μ\mu.
  • It is bell-shaped and symmetric around the mean.
  • The curve extends infinitely in both directions.
  • It has two points of inflection at x=μ−σx = \mu - \sigma and x=μ+σx = \mu + \sigma.

🔑 Important: Symmetry about the mean is a core characteristic of the normal distribution.

2.3 Standard normal distribution

  • A special case of the normal distribution has a mean (μ\mu) of 0 and a standard deviation (σ\sigma) of 1.
  • This is called the standard normal distribution, usually denoted by the symbol Z.
  • Its PDF is: f(z)=12πe−z22f(z) = \frac{1}{\sqrt{2\pi}} e^{-\frac{z^2}{2}} for −∞<z<∞-\infty < z < \infty.

2.3.1 Cumulative distribution function (CDF)

  • The cumulative distribution function (CDF) of Z, denoted F(z)F(z), gives the probability P(Z≤z)P(Z \le z).
  • This function is tabulated in standard normal tables.
  • The formula for the CDF is: F(z)=∫−∞z12πe−t22dtF(z) = \int_{-\infty}^{z} \frac{1}{\sqrt{2\pi}} e^{-\frac{t^2}{2}} dt

2.4 Symmetry properties of the standard normal distribution

  • PDF symmetry: The PDF is an even function, meaning f(z)=f(−z)f(z) = f(-z). The curve is identical on both sides of the y-axis.
  • Tail area symmetry: The area under the curve to the left of −a-a equals the area to the right of aa.
  • Z and -Z symmetry: If ZZ follows a standard normal distribution, then −Z-Z also follows a standard normal distribution.

🔑 Important: f(z)=f(−z)f(z) = f(-z) means the shape of the curve is mirrored around z=0z=0.

2.5 Using the standard normal table

  • Standard normal tables provide P(Z≤z)P(Z \le z) for various values of zz.

  • Common values:

    • P(Z≤1.96)=0.9750P(Z \le 1.96) = 0.9750
    • P(Z≤2.33)=0.9900P(Z \le 2.33) = 0.9900
    • P(Z≤1.645)=0.9500P(Z \le 1.645) = 0.9500
  • Key relationships from symmetry:

    • F(−z)=P(Z≤−z)=1−P(Z≤z)=1−F(z)F(-z) = P(Z \le -z) = 1 - P(Z \le z) = 1 - F(z)
    • P(a≤Z≤b)=F(b)−F(a)P(a \le Z \le b) = F(b) - F(a)
    • P(−a≤Z≤a)=F(a)−F(−a)=2F(a)−1P(-a \le Z \le a) = F(a) - F(-a) = 2F(a) - 1

🔑 Important: F(−z)=1−F(z)F(-z) = 1 - F(z) is a direct consequence of the curve's symmetry around z=0z=0.

2.5.1 Calculating probabilities and finding values

  • Probabilities:

    • P(Z≤z)P(Z \le z) can be read directly from the table.
    • P(Z≥z)=1−P(Z≤z)P(Z \ge z) = 1 - P(Z \le z).
    • P(Z≤−z)=1−F(z)P(Z \le -z) = 1 - F(z).
    • P(Z=z)=0P(Z = z) = 0 for any continuous distribution.
  • Finding values (quantiles):

    • If P(Z≤T)=αP(Z \le T) = \alpha, you look up the probability α\alpha in the table to find the corresponding TT value.
  • Notation for quantiles: zαz_\alpha is the value such that P(Z>zα)=αP(Z > z_\alpha) = \alpha. This is equivalent to P(Z≤zα)=1−αP(Z \le z_\alpha) = 1 - \alpha.

    • Example: z0.05=1.645z_{0.05} = 1.645 because P(Z>1.645)=0.05P(Z > 1.645) = 0.05.
    • Also, z1−α=−zαz_{1-\alpha} = -z_\alpha.

📝 Example: Find P(Z≤1.84)P(Z \le 1.84). Look up 1.84 in the Z-table; it's 0.9671. Find P(Z≥2.76)P(Z \ge 2.76). Calculate 1−P(Z≤2.76)=1−0.9971=0.00291 - P(Z \le 2.76) = 1 - 0.9971 = 0.0029. Find TT such that P(Z≤T)=0.8P(Z \le T) = 0.8. Look for 0.8000 in the table; it's approximately T=0.84T=0.84.

2.6 Standardizing a normal random variable

  • If a random variable XX has a normal distribution with mean μ\mu and standard deviation σ\sigma, it can be converted to a standard normal variable ZZ using the formula: Z=X−μσZ = \frac{X - \mu}{\sigma}
  • This process is called standardization.

> Standardization converts any normal distribution to the standard normal distribution.

  • Probabilities for XX can then be calculated using probabilities for ZZ.
    • P(a≤X≤b)=P(a−μσ≤Z≤b−μσ)P(a \le X \le b) = P\left(\frac{a - \mu}{\sigma} \le Z \le \frac{b - \mu}{\sigma}\right)
    • This equals F(b−μσ)−F(a−μσ)F\left(\frac{b - \mu}{\sigma}\right) - F\left(\frac{a - \mu}{\sigma}\right).

🔑 Important: Standardizing allows us to use the pre-calculated Z-tables for any normal distribution.

2.6.1 Problem: Calculating probabilities for a non-standard normal variable

  • Given a normal distribution with μ=16.2\mu = 16.2 and σ2=1.5625\sigma^2 = 1.5625 (so σ=1.5625=1.25\sigma = \sqrt{1.5625} = 1.25).
QuestionCalculationResult
P(X>16.8)P(X > 16.8)P(Z>16.8−16.21.25)=P(Z>0.48)=1−F(0.48)=1−0.6844P\left(Z > \frac{16.8 - 16.2}{1.25}\right) = P(Z > 0.48) = 1 - F(0.48) = 1 - 0.68440.3156
P(X<14.9)P(X < 14.9)P(Z<14.9−16.21.25)=P(Z<−1.04)=F(−1.04)=1−F(1.04)=1−0.8508P\left(Z < \frac{14.9 - 16.2}{1.25}\right) = P(Z < -1.04) = F(-1.04) = 1 - F(1.04) = 1 - 0.85080.1492
P(13.6≤X≤18.8)P(13.6 \le X \le 18.8)P(13.6−16.21.25≤Z≤18.8−16.21.25)=P(−2.08≤Z≤2.08)=F(2.08)−F(−2.08)P\left(\frac{13.6 - 16.2}{1.25} \le Z \le \frac{18.8 - 16.2}{1.25}\right) = P(-2.08 \le Z \le 2.08) = F(2.08) - F(-2.08)0.9624

🔑 Important: When dealing with probabilities for any normal distribution, the first step is always to standardize the variable.

3. Normal distribution and its properties (part 2)

3.1 Using the normal distribution for binomial probabilities

The normal distribution can approximate the binomial distribution. This is useful when calculating binomial probabilities becomes too complex.

  • Rule: Use this approximation when both npnp and n(1−p)n(1-p) are greater than 15. Here, nn is the number of trials and pp is the probability of success.

When approximating, a binomial probability P(X=a)P(X=a) is converted to a normal probability P(a−0.5<Y<a+0.5)P(a-0.5 < Y < a+0.5). The variable YY follows a normal distribution with mean npnp and variance np(1−p)np(1-p).

  • Continuity correction: This involves adjusting the binomial probability to a continuous normal probability.
Binomial ProbabilityNormal Probability
P[X=a]P[X = a]P[a−0.5<Y<a+0.5]P[a-0.5 < Y < a+0.5]
P[X≥a]P[X \ge a]P[Y>a−0.5]P[Y > a-0.5]
P[X>a]P[X > a]P[Y>a+0.5]P[Y > a+0.5]
P[X≤a]P[X \le a]P[Y<a+0.5]P[Y < a+0.5]
P[X<a]P[X < a]P[Y<a−0.5]P[Y < a-0.5]

📝 Example: A quiz has 200 questions, each with 4 answers. To find the probability of getting 25 to 30 correct answers by guessing alone, you can use the normal approximation if np>15np > 15 and n(1−p)>15n(1-p) > 15.

3.2 Problems involving the normal distribution

The normal distribution is used when dealing with continuous random variables that follow a bell-shaped curve. You often need to find probabilities within certain ranges or find a value given a probability.

  • Standardizing: Convert a normal variable XX to a standard normal variable ZZ using the formula Z=X−μσZ = \frac{X - \mu}{\sigma}. Here, μ\mu is the mean and σ\sigma is the standard deviation.
  • Probability calculations: Use the standard normal cumulative distribution function (CDF), denoted as Φ(z)\Phi(z), to find probabilities. Φ(z)=P(Z≤z)\Phi(z) = P(Z \le z).
    • P(a≤X≤b)P(a \le X \le b) becomes P(a−μσ≤Z≤b−μσ)=Φ(b−μσ)−Φ(a−μσ)P\left(\frac{a-\mu}{\sigma} \le Z \le \frac{b-\mu}{\sigma}\right) = \Phi\left(\frac{b-\mu}{\sigma}\right) - \Phi\left(\frac{a-\mu}{\sigma}\right).
    • P(X≥a)P(X \ge a) becomes P(Z≥a−μσ)=1−Φ(a−μσ)P\left(Z \ge \frac{a-\mu}{\sigma}\right) = 1 - \Phi\left(\frac{a-\mu}{\sigma}\right).
    • P(X≤a)P(X \le a) becomes P(Z≤a−μσ)=Φ(a−μσ)P\left(Z \le \frac{a-\mu}{\sigma}\right) = \Phi\left(\frac{a-\mu}{\sigma}\right).

📝 Example: The developing time for a print follows a normal distribution with a mean of 16.28 seconds and a standard deviation of 0.12 second. To find the probability it takes between 16.00 and 16.50 seconds, you would standardize these values and use the ZZ-table.

  • Finding a value given a probability: If you need to find a value xx such that P(X≤x)=pP(X \le x) = p, you first find the zz-score corresponding to probability pp from the ZZ-table, and then solve for xx using x=μ+zσx = \mu + z\sigma.

📝 Example: For Pima clay loam with μ=1.5\mu = 1.5 g/cm³ and σ=0.2\sigma = 0.2 g/cm³, find the bulk density value where only 10% of samples are higher. This means P(X≥x)=0.10P(X \ge x) = 0.10, or P(X≤x)=0.90P(X \le x) = 0.90. Find the zz-score for 0.90 and use it to calculate xx.

🔑 Important: Remember to use the correct continuity correction when approximating binomial probabilities with the normal distribution. For example, P(X≥a)P(X \ge a) becomes P(Y>a−0.5)P(Y > a-0.5).

🔑 Important: Always check if npnp and n(1−p)n(1-p) are greater than 15 before using the normal approximation to the binomial distribution.

🔑 Important: The ZZ-score represents the number of standard deviations a value is from the mean. A positive ZZ-score means the value is above the mean; a negative ZZ-score means it is below the mean.

4. Normal distribution and its properties (part 3)

4.1 The standard normal distribution

The standard normal distribution is a special case of the normal distribution. It has a mean of 0 and a standard deviation of 1.

This distribution is also called the Z-distribution.

  • Notation: Z∼N(0,1)Z \sim N(0, 1)
  • Probability Density Function (PDF): The PDF of a standard normal variable ZZ is given by: f(z)=12πe−12z2f(z) = \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2}z^2} where zz is any real number.

🔑 Important: The Z-distribution simplifies calculations because we can use standard tables to find probabilities.

4.2 Cumulative Distribution Function (CDF) of the standard normal distribution

The CDF of a standard normal variable ZZ, denoted by Φ(z)\Phi(z), gives the probability that ZZ is less than or equal to a specific value zz.

  • Definition: Φ(z)=P(Z≤z)=∫−∞z12πe−12t2dt\Phi(z) = P(Z \le z) = \int_{-\infty}^{z} \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2}t^2} dt
  • Symmetry: The standard normal distribution is symmetric around its mean of 0. This symmetry is crucial for using tables.
    • Φ=0.5\Phi = 0.5 .
    • Φ(−z)=1−Φ(z)\Phi(-z) = 1 - \Phi(z)

🔑 Important: The property Φ(−z)=1−Φ(z)\Phi(-z) = 1 - \Phi(z) means the area to the left of −z-z is the same as the area to the right of zz.

4.3 Using standard normal tables

Standard normal tables (Z-tables) provide the cumulative probabilities Φ(z)\Phi(z) for positive values of zz. The symmetry property allows us to find probabilities for negative zz values.

  • Finding P(Z≤z)P(Z \le z) for z>0z > 0: Look up the value zz directly in the Z-table.
  • Finding P(Z≤z)P(Z \le z) for z<0z < 0: Use the symmetry property: P(Z≤−z)=1−P(Z≤z)P(Z \le -z) = 1 - P(Z \le z).
  • Finding P(a<Z<b)P(a < Z < b): This is calculated as P(Z<b)−P(Z<a)P(Z < b) - P(Z < a), which is Φ(b)−Φ(a)\Phi(b) - \Phi(a).

📝 Example: To find P(Z<−1.96)P(Z < -1.96), we use Φ(−1.96)=1−Φ(1.96)\Phi(-1.96) = 1 - \Phi(1.96). If the table shows Φ(1.96)≈0.975\Phi(1.96) \approx 0.975, then P(Z<−1.96)≈1−0.975=0.025P(Z < -1.96) \approx 1 - 0.975 = 0.025.

4.4 Properties of the normal distribution

The normal distribution, often called the bell curve, has several key characteristics. These properties make it widely applicable in statistics.

  • Symmetry: The distribution is perfectly symmetric around its mean (μ\mu). The left side is a mirror image of the right side.
  • Bell Shape: The curve is unimodal (has one peak) and bell-shaped. The highest point is at the mean.
  • Asymptotic Tails: The curve approaches the horizontal axis but never touches it. This means probabilities in the extreme tails are very small but not zero.
  • Mean, Median, Mode: For a normal distribution, the mean, median, and mode are all equal and located at the center of the distribution.

🔑 Important: The shape of the normal distribution is determined by its mean (μ\mu) and standard deviation (σ\sigma).

4.5 The Empirical Rule (68-95-99.7 Rule)

For any normal distribution, the Empirical Rule provides approximate probabilities for data falling within certain standard deviations from the mean.

Interval from MeanPercentage of Data
μ±1σ\mu \pm 1\sigmaApproximately 68%
μ±2σ\mu \pm 2\sigmaApproximately 95%
μ±3σ\mu \pm 3\sigmaApproximately 99.7%

📝 Example: If a student's test scores are normally distributed with a mean of 75 and a standard deviation of 10, about 95% of scores fall between 75±275 \pm 2 , or between 55 and 95 10.

4.6 Relationship between normal and other distributions

While the focus is on the normal distribution, it's important to note its connections to other distributions.

  • Binomial Distribution Approximation: For a large number of trials (nn) in a binomial distribution, it can be approximated by a normal distribution. This is particularly useful when calculating probabilities for sums of independent Bernoulli trials.
  • Poisson Distribution Approximation: Under certain conditions (large mean λ\lambda), a Poisson distribution can also be approximated by a normal distribution.

🔑 Important: These approximations simplify complex probability calculations, especially for large sample sizes or parameter values.

🔑 Important: The normal distribution and its standard form (Z-distribution) are fundamental tools for statistical inference and hypothesis testing. Understanding their properties and how to use Z-tables is crucial for exam success.

5. Joint distributions and regression analysis (part 1)

5.1 Joint probability distributions

  • Joint distribution: Describes the probabilities of multiple random variables occurring simultaneously.
  • For two discrete random variables, XX and YY, the joint probability is written as P(X=x,Y=y)P(X=x, Y=y).
  • This is also known as the joint probability mass function (PMF) for discrete variables, denoted as fXY(x,y)f_{XY}(x, y).
  • Properties of fXY(x,y)f_{XY}(x,y) for discrete variables:
    • 0≤fXY(x,y)≤10 \le f_{XY}(x,y) \le 1.
    • ∑x∑yfXY(x,y)=1\sum_{x} \sum_{y} f_{XY}(x,y) = 1.

📝 Example: Rolling two dice. Let XX be the value on the first die and YY be the value on the second. The joint distribution is fXY(x,y)=1/36f_{XY}(x,y) = 1/36 for all x,yx, y from 1 to 6.

  • For continuous random variables XX and YY, their joint behavior is described by a joint probability density function (PDF), fXY(x,y)f_{XY}(x,y).
  • The integral of the joint PDF over a region gives the probability of (X,Y)(X,Y) falling within that region.
  • Properties of fXY(x,y)f_{XY}(x,y) for continuous variables:
    • fXY(x,y)≥0f_{XY}(x,y) \ge 0.
    • ∫−∞∞∫−∞∞fXY(x,y) dx dy=1\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f_{XY}(x,y) \,dx \,dy = 1.

5.2 Marginal distributions

  • Marginal distribution: Describes the probability distribution of a single random variable, ignoring others.
  • For discrete random variables XX and YY with joint distribution fXY(x,y)f_{XY}(x,y):
    • Marginal PMF of XX: fX(x)=∑yfXY(x,y)f_X(x) = \sum_{y} f_{XY}(x,y).
    • Marginal PMF of YY: fY(y)=∑xfXY(x,y)f_Y(y) = \sum_{x} f_{XY}(x,y).
  • For continuous random variables XX and YY with joint PDF fXY(x,y)f_{XY}(x,y):
    • Marginal PDF of XX: fX(x)=∫−∞∞fXY(x,y) dyf_X(x) = \int_{-\infty}^{\infty} f_{XY}(x,y) \,dy.
    • Marginal PDF of YY: fY(y)=∫−∞∞fXY(x,y) dxf_Y(y) = \int_{-\infty}^{\infty} f_{XY}(x,y) \,dx.

🔑 Important: Marginal distributions are obtained by summing (discrete) or integrating (continuous) the joint distribution over all possible values of the other variable(s).

5.3 Dependence and independence

  • Independence: Two random variables XX and YY are independent if the outcome of one does not affect the outcome of the other.
  • For discrete variables: XX and YY are independent if fXY(x,y)=fX(x)fY(y)f_{XY}(x,y) = f_X(x) f_Y(y) for all x,yx, y.
  • For continuous variables: XX and YY are independent if fXY(x,y)=fX(x)fY(y)f_{XY}(x,y) = f_X(x) f_Y(y) for all x,yx, y.
  • If the condition fXY(x,y)=fX(x)fY(y)f_{XY}(x,y) = f_X(x) f_Y(y) is not met, the variables are dependent.

🔑 Important: Independence is a strong condition. If variables are dependent, knowing one provides information about the other.

5.4 Conditional probability distributions

  • Conditional probability distribution: Describes the probability distribution of one random variable given that another has taken a specific value.
  • For discrete variables XX and YY, the conditional PMF of XX given Y=yY=y is: fX∣Y(x∣y)=fXY(x,y)fY(y)f_{X|Y}(x|y) = \frac{f_{XY}(x,y)}{f_Y(y)}, provided fY(y)≠0f_Y(y) \neq 0.
  • Similarly, the conditional PMF of YY given X=xX=x is: fY∣X(y∣x)=fXY(x,y)fX(x)f_{Y|X}(y|x) = \frac{f_{XY}(x,y)}{f_X(x)}, provided fX(x)≠0f_X(x) \neq 0.
  • For continuous variables, the conditional PDF is defined analogously using their joint and marginal PDFs.

📝 Example: Given two dice rolls (XX on first, TT on total), find the probability the total is 4 given the first die is 3. This is fT∣X(4∣3)=fTX(3,4)fXf_{T|X}(4|3) = \frac{f_{TX}(3,4)}{f_X } 3.

🔑 Important: Conditional probabilities are crucial for understanding how variables influence each other. If XX and YY are independent, then fX∣Y(x∣y)=fX(x)f_{X|Y}(x|y) = f_X(x) and fY∣X(y∣x)=fY(y)f_{Y|X}(y|x) = f_Y(y).

🔑 Important: Joint distributions describe relationships between variables; marginal distributions describe individual variables; conditional distributions describe relationships when one variable's value is known.

6. Joint distributions and regression analysis (part 2)

6.1 Discrete joint distributions

  • Joint probability distribution: For two discrete random variables XX and YY, this is fXY(x,y)=P(X=x,Y=y)f_{XY}(x, y) = P(X = x, Y = y).
  • Properties:
    • 0≤fXY(x,y)≤10 \leq f_{XY}(x, y) \leq 1.
    • ∑x∑yfXY(x,y)=1\sum_{x} \sum_{y} f_{XY}(x, y) = 1.

📝 Example: If XX is the number of hoses used on a self-service island and YY is the number used on a full-service island, fXY(1,1)=0.20f_{XY}(1, 1) = 0.20 means there is a 20% probability that exactly one hose is used on each island.

6.2 Marginal distributions

  • Marginal distribution of X: Summing the joint probability over all possible values of YY: fX(x)=∑yfXY(x,y)f_X(x) = \sum_{y} f_{XY}(x, y).
  • Marginal distribution of Y: Summing the joint probability over all possible values of XX: fY(y)=∑xfXY(x,y)f_Y(y) = \sum_{x} f_{XY}(x, y).

🔑 Important: Marginal distributions describe the probability of each individual variable, ignoring the other.

6.3 Continuous joint distributions

  • For two continuous random variables XX and YY, the ordered pair (X,Y)(X, Y) is a two-dimensional or bivariate continuous random variable.
  • Their joint probability density function (pdf), fXY(x,y)f_{XY}(x, y), describes the probability density over a region in the xyxy-plane.

6.4 Independence of random variables

  • Independence condition: Two random variables XX and YY are independent if and only if their joint probability distribution is the product of their marginal distributions: fXY(x,y)=fX(x)fY(y)f_{XY}(x, y) = f_X(x) f_Y(y).
  • If this condition does not hold, XX and YY are dependent.

> X and Y independent ⟺ fXY(x,y)=fX(x)fY(y)f_{XY}(x, y) = f_X(x) f_Y(y)

6.5 Conditional probability distributions

  • Conditional probability mass function (for discrete RVs): The probability of X=xX=x given Y=yY=y is fX∣Y(x∣y)=fXY(x,y)fY(y)f_{X|Y}(x|y) = \frac{f_{XY}(x, y)}{f_Y(y)}, provided fY(y)≠0f_Y(y) \neq 0.
  • If XX and YY are independent, then fX∣Y(x∣y)=fX(x)f_{X|Y}(x|y) = f_X(x). This means knowing the value of YY does not change the probability distribution of XX.

6.6 Regression analysis: Simple linear regression

  • Simple linear regression models the relationship between a dependent variable and one independent variable using a linear equation.
  • The model is expressed as: Y=β0+β1X+ϵY = \beta_0 + \beta_1 X + \epsilon.
    • YY: Dependent variable.
    • XX: Independent variable.
    • β0\beta_0: Intercept.
    • β1\beta_1: Slope (regression coefficient).
    • ϵ\epsilon: Error term, representing random variation not explained by XX.

6.7 Correlation and coefficient of determination

  • Correlation coefficient (rr): Measures the strength and direction of the linear relationship between two variables. It ranges from -1 (perfect negative correlation) to +1 (perfect positive correlation).
  • Coefficient of determination (r2r^2): The proportion of the variance in the dependent variable that is predictable from the independent variable. It is the square of the correlation coefficient.

> r2r^2 tells us the percentage of variation in Y explained by X.

ConceptDescription
Joint distribution fXY(x,y)f_{XY}(x, y)Probability of X=xX=x and Y=yY=y for discrete RVs.
Marginal distribution fX(x)f_X(x)Probability of X=xX=x, summing over all YY values.
IndependencefXY(x,y)=fX(x)fY(y)f_{XY}(x, y) = f_X(x) f_Y(y)
Conditional probability $f_{XY}(x
Simple linear regression modelY=β0+β1X+ϵY = \beta_0 + \beta_1 X + \epsilon
Coefficient of determination r2r^2Proportion of variance in YY explained by XX.

🔑 Important: Understanding joint distributions is crucial for analyzing relationships between variables, while regression helps quantify and predict these relationships.

7. Joint distributions and regression analysis (part 3)

7.1 Expectation, mean, and covariance

  • The expectation of a function H(X,Y)H(X,Y) of two random variables XX and YY is defined by integrating (for continuous variables) or summing (for discrete variables) H(x,y)H(x,y) multiplied by their joint probability density function (PDF) or probability mass function (PMF) over all possible values.
  • The mean of a random variable XX, denoted μX\mu_X or E[X]E[X], is its expected value. Similarly, μY\mu_Y or E[Y]E[Y] is the mean of YY.
  • Covariance, Cov(X,Y)Cov(X,Y), measures the joint variability of two random variables. It is calculated as the expected value of the product of their deviations from their means: Cov(X,Y)=E[(X−μX)(Y−μY)]Cov(X,Y) = E[(X - \mu_X)(Y - \mu_Y)].
  • An alternative formula for covariance is Cov(X,Y)=E[XY−E[X]E[Y]Cov(X,Y) = E[XY - E[X]E[Y].

Covariance indicates the direction of the linear relationship between two variables.

7.2 Properties of expectation and covariance

  • For random variables XX and YY, and constants a,b,c,da, b, c, d:

    • E[aX+b=aE[X+bE[aX + b = aE[X + b
    • Var(aX+b)=a2Var(X)Var(aX + b) = a^2 Var(X)
    • E[aX+bY=aE[X+bE[Y]E[aX + bY = aE[X + bE[Y]
    • Cov(aX+b,cY+d)=ac⋅Cov(X,Y)Cov(aX + b, cY + d) = ac \cdot Cov(X,Y)
    • If XX and YY are independent, then E[aX+b)(cY+d)]=(aE[X+b)(cE[Y+d)E[aX + b)(cY + d)] = (aE[X + b)(cE[Y + d).
  • Key relationship: E[aX+bY=aE[X+bE[Y]E[aX+bY = aE[X + bE[Y] always holds, whether XX and YY are independent or not 127.

7.3 Covariance and independence

  • If two random variables XX and YY are independent, their covariance is zero: Cov(X,Y)=0Cov(X,Y) = 0.
  • The converse is not always true: Cov(X,Y)=0Cov(X,Y) = 0 does not necessarily imply that XX and YY are independent129.
  • Zero covariance implies no linear relationship between the variables. It does not rule out other types of relationships 128.

🔑 Important: Independence implies zero covariance, but zero covariance does not imply independence.

7.4 Examples and applications

  • The expectation of a function H(X,Y)H(X,Y) involves integrating or summing H(x,y)H(x,y) against the joint PDF/PMF. This can be used to calculate probabilities or expected values of derived quantities 114 117.
  • Consider two fair coins tossed. Let XX be the number of heads and YY be the number of tails. The possible outcomes (X,Y)(X,Y) are (0,2), (1,1), and (2,0). Calculating their joint PMF allows for determining means and covariances 115.
  • To find the mean of a conditional density, first determine the conditional PDF fX∣Y(x∣y)f_{X|Y}(x|y) or fY∣X(y∣x)f_{Y|X}(y|x), then compute its expectation 122.
  • To evaluate P[X≥Y]P[X \ge Y], integrate or sum the joint PDF/PMF over the region where X≥YX \ge Y 125 126.
  • Finding the constant cc in a joint PDF often requires that the integral of the PDF over its entire domain equals 1.

7.4.1 Checking for independence

  • Two random variables XX and YY are independent if their joint PDF (or PMF) f(x,y)f(x,y) equals the product of their marginal PDFs (or PMFs): f(x,y)=fX(x)⋅fY(y)f(x,y) = f_X(x) \cdot f_Y(y) for all x,yx, y.
  • If this condition holds, XX and YY are independent. If it does not hold for any pair (x,y)(x,y), they are dependent.

🔑 Important: Independence requires f(x,y)=fX(x)fY(y)f(x,y) = f_X(x) f_Y(y). If this equation fails anywhere, the variables are dependent.

🔑 Important: When checking for independence using covariance, remember Cov(X,Y)=0Cov(X,Y)=0 is necessary but not sufficient. Always verify the PDF product rule.

🔑 Important: For an exam, be ready to calculate marginal densities from a joint density and then test for independence by checking if f(x,y)=fX(x)fY(y)f(x,y) = f_X(x) f_Y(y) 124.

8. Joint distributions and regression analysis (part 4)

8.1 Variance and covariance

The variance of a sum or difference of two random variables extends to include their covariance. This is a crucial step in understanding the variability of combined random processes.

  • The variance of the sum of two random variables XX and YY is given by: Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)Var(X + Y) = Var(X) + Var(Y) + 2Cov(X, Y)
  • The variance of the difference between two random variables XX and YY is: Var(X−Y)=Var(X)+Var(Y)−2Cov(X,Y)Var(X - Y) = Var(X) + Var(Y) - 2Cov(X, Y)
  • For a general linear combination of nn random variables XiX_i with coefficients aia_i: Var(∑iaiXi)=∑iai2Var(Xi)+2∑i<jaiajCov(Xi,Xj)Var\left(\sum_{i} a_i X_i\right) = \sum_{i} a_i^2 Var(X_i) + 2\sum_{i<j} a_i a_j Cov(X_i, X_j)

The covariance term accounts for how the variables move together.

8.2 Review of past topics

This section briefly recaps the topics covered in previous sessions, setting the stage for further learning.

Topic CoveredChapter Reference
ProbabilityChapter 3
Discrete Probability DistributionChapter 4
Continuous Probability DistributionChapter 5
Joint DistributionCovered

These foundational topics are essential for understanding regression analysis.

🔑 Important: Understanding how variances and covariances combine is key to analyzing the total variability in a system with multiple interacting random variables.

9. Sampling distributions and the Central Limit Theorem (part 1)

9.1 Independent and identically distributed (IID) random variables

  • IID random variables: A set of random variables X1,X2,…,XkX_1, X_2, \dots, X_k are IID if they are independent and each has the same marginal distribution.

  • Random sample: A random sample of size nn from a population means that each possible sample of size nn has an equal chance of being selected.

  • The random variables XiX_i form a random sample of size nn from an infinite population f(x)f(x) if:

    • The XiX_i are independent.
    • The XiX_i are identically distributed, meaning each XiX_i comes from the same population with distribution f(x)f(x).
  • Practical sampling from finite populations: If the sample size nn is at most 5% of the population size NN (i.e., n/N≤0.05n/N \le 0.05), we can treat the XiX_i as if they form a random sample.

  • Sampled values: Observed values x1,…,xnx_1, \dots, x_n are specific instances of the random variables X1,…,XnX_1, \dots, X_n.

9.2 Sample mean and variance

A statistic is any value calculated from sample data. Before data is collected, a statistic is a random variable.

A statistic's value is uncertain before sampling.

A sample mean Xˉ\bar{X} and sample variance S2S^2 are calculated from a sample X1,…,XnX_1, \dots, X_n.

  • Sample mean formula: Xˉ=1n∑i=1nXi\bar{X} = \frac{1}{n} \sum_{i=1}^{n} X_i

  • Sample variance formula: S2=1n−1∑i=1n(Xi−Xˉ)2S^2 = \frac{1}{n-1} \sum_{i=1}^{n} (X_i - \bar{X})^2

  • Expected value of sample mean: E(Xˉ)=μE(\bar{X}) = \mu

  • Variance of sample mean (infinite population): Var(Xˉ)=σ2nVar(\bar{X}) = \frac{\sigma^2}{n}

  • Variance of sample mean (finite population): Var(Xˉ)=σ2n(N−nN−1)Var(\bar{X}) = \frac{\sigma^2}{n} \left( \frac{N-n}{N-1} \right)

  • Expected value of sample variance: E(S2)=σ2E(S^2) = \sigma^2

The sample mean is an unbiased estimator of the population mean (μ\mu). The sample variance is an unbiased estimator of the population variance (σ2\sigma^2).

9.3 Sampling distributions example

Consider a population of grades: {3, 6, 9, 12, 15}. The population mean is μ=9\mu = 9 and the population variance is σ2=18\sigma^2 = 18.

We take a simple random sample of size n=3n=3 with replacement. The possible samples and their means illustrate a sampling distribution.

Sample Values (X1,X2,X3)(X_1, X_2, X_3)Sample Mean (Xˉ)(\bar{X})
(3, 6, 9)6
(3, 6, 12)7
(3, 6, 15)8
(3, 9, 12)8
(3, 9, 15)9
(3, 12, 15)10
(6, 9, 12)9
(6, 9, 15)10
(6, 12, 15)11
(9, 12, 15)12

The sampling distribution of the sample mean Xˉ\bar{X} has the following probabilities:

Xˉ=x\bar{X} = xP(x)P(x)
60.1
70.1
80.2
90.2
100.2
110.1
120.1

For this sample distribution:

  • E(Xˉ)=9E(\bar{X}) = 9
  • Var(Xˉ)=3Var(\bar{X}) = 3

This aligns with the formulas: E(Xˉ)=μ=9E(\bar{X}) = \mu = 9 and Var(Xˉ)=σ2n(N−nN−1)=183(5−35−1)=6(24)=3Var(\bar{X}) = \frac{\sigma^2}{n} \left( \frac{N-n}{N-1} \right) = \frac{18}{3} \left( \frac{5-3}{5-1} \right) = 6 \left( \frac{2}{4} \right) = 3.

The sampling distribution describes the probabilities of all possible sample means.

9.4 Other sample statistics

Beyond the mean and variance, other sample statistics can be calculated:

StatisticNotationFormula
Sample minimumXminX_{min}min⁡(X1,…,Xn)\min(X_1, \dots, X_n)
Sample maximumXmaxX_{max}max⁡(X1,…,Xn)\max(X_1, \dots, X_n)
Sample rangeRRXmax−XminX_{max} - X_{min}

🔑 Important: While E(Xˉ)=μE(\bar{X}) = \mu and E(S2)=σ2E(S^2) = \sigma^2, the expected values of other sample statistics (like minimum, maximum, or range) are not generally equal to their population counterparts.

🔑 Important: Understanding sampling distributions is key to inferring population characteristics from sample data. Part 1 focuses on the foundations: IID variables and the properties of sample statistics like the mean and variance.

10. Sampling distributions and the Central Limit Theorem (part 2)

10.1 The Central Limit Theorem (CLT)

  • Central Limit Theorem (CLT): For any population distribution, if the sample size (nn) is large enough, the distribution of the sample mean (Xˉ\bar{X}) will be approximately normal. This distribution will be centered around the population mean (μ\mu) and its spread will decrease as nn increases.
  • If X1,X2,…,XnX_1, X_2, \dots, X_n is a random sample (i.e., XiX_i are independent and identically distributed or i.i.d.) from a distribution with mean μ\mu and variance σ2\sigma^2, then for large nn, the sample mean Xˉ\bar{X} is approximately normal with mean μ\mu and variance σ2/n\sigma^2/n.
    • This can be written as: Xˉ→approxN(μ,σ2/n)\bar{X} \xrightarrow{approx} N(\mu, \sigma^2/n).
  • For large nn, the standardized sample mean follows a standard normal distribution: Xˉ−μσ/n→approxN(0,1)\frac{\bar{X} - \mu}{\sigma/\sqrt{n}} \xrightarrow{approx} N(0, 1)
  • Randomization: Assumes each sample is a random, i.i.d. sample from the population.
  • Large enough sample size: The required sample size depends on the population's shape.

The CLT bridges the gap between any population distribution and the normal distribution for sample means.

10.2 Sample size considerations for CLT

  • If the original population distribution is already normal, then the sampling distribution of the mean (Xˉ\bar{X}) is exactly normal for any sample size nn.
  • If the population distribution is approximately symmetric, the sampling distribution of Xˉ\bar{X} becomes approximately normal for relatively small sample sizes.
  • When the population distribution is skewed, a sample size of at least n=30n=30 is generally considered sufficient for the sampling distribution of Xˉ\bar{X} to be approximately normal.
Population Distribution ShapeMinimum Sample Size (nn) for Approximate Normality of Xˉ\bar{X}
NormalAny nn
Approximately SymmetricRelatively small nn
Skewedn≥30n \ge 30

10.3 Steps for applying the CLT

  • Step 1: Identify problem parameters:
    • Population mean (μ\mu)
    • Population standard deviation (σ\sigma)
    • Sample size (nn)
  • Step 2: Define the event of interest:
    • Determine the range for the sample mean (Xˉ\bar{X}) you are interested in.
    • Express this as a "greater than" or "less than" probability for Xˉ\bar{X}.
  • Step 3: Apply CLT to find the distribution of Xˉ\bar{X}:
    • Use the CLT to state that Xˉ\bar{X} is approximately normal: Xˉ∼N(μ,σ2/n)\bar{X} \sim N(\mu, \sigma^2/n).
    • Calculate the standard deviation of the sample mean, often called the standard error: σXˉ=σ/n\sigma_{\bar{X}} = \sigma/\sqrt{n}.
  • Step 4: Convert to a Z-score:
    • Standardize Xˉ\bar{X} using the Z-score formula: Z=Xˉ−μσ/nZ = \frac{\bar{X} - \mu}{\sigma/\sqrt{n}}.
    • Calculate the probability using the standard normal distribution (Z-table or calculator).

The CLT allows us to use the well-understood normal distribution to approximate probabilities for sample means, even if the population distribution is unknown or non-normal.

10.4 Problem examples using the CLT

📝 Example: A certain brand of tires has a mean life of 25,000 km with a standard deviation of 1600 km. What is the probability that the mean life of 64 tires is less than 24,600 km?

  • Parameters: μ=25000\mu = 25000 km, σ=1600\sigma = 1600 km, n=64n = 64.
  • Standard error: σXˉ=σ/n=1600/64=1600/8=200\sigma_{\bar{X}} = \sigma/\sqrt{n} = 1600/\sqrt{64} = 1600/8 = 200 km.
  • Event: We want to find P(Xˉ<24600)P(\bar{X} < 24600).
  • Z-score calculation: Z=24600−25000200=−400200=−2Z = \frac{24600 - 25000}{200} = \frac{-400}{200} = -2.
  • Probability: P(Xˉ<24600)=P(Z<−2)=0.0228P(\bar{X} < 24600) = P(Z < -2) = 0.0228.

📝 Example: A hawker sells dolls with a mean price of Rs. 700 and a standard deviation of Rs. 250. If a random sample of 60 dolls is chosen, what is the probability that he earns Rs. 45,000 or more from this sample?

  • Parameters: μ=700\mu = 700 dollars, σ=250\sigma = 250 dollars, n=60n = 60.
  • Event: We want to find the probability that the sample mean price is Rs. 45,000 / 60 = Rs. 750 or more. So, P(Xˉ>750)P(\bar{X} > 750).
  • Standard error: σXˉ=σ/n=250/60≈250/7.746≈32.27\sigma_{\bar{X}} = \sigma/\sqrt{n} = 250/\sqrt{60} \approx 250/7.746 \approx 32.27 dollars.
  • Z-score calculation: Z=750−70032.27=5032.27≈1.55Z = \frac{750 - 700}{32.27} = \frac{50}{32.27} \approx 1.55.
  • Probability: P(Xˉ>750)=P(Z>1.55)=1−P(Z≤1.55)≈1−0.9394=0.0606P(\bar{X} > 750) = P(Z > 1.55) = 1 - P(Z \le 1.55) \approx 1 - 0.9394 = 0.0606.

🔑 Important: The CLT is most powerful when the population distribution is unknown or significantly non-normal, provided the sample size is sufficiently large (n≥30n \ge 30 is a common rule of thumb).


🔑 Important: Statistical inference relies on making generalizations about a population from a sample. The CLT is a cornerstone of this process, allowing us to understand the behavior of sample means and make probabilistic statements about populations.

11. Sampling distributions and the Central Limit Theorem (part 3)

11.1 Point estimation

  • Point estimation uses a single number to estimate an unknown population parameter.
  • A statistic calculated from sample data serves as the point estimator.
  • The calculated value from a specific sample is the point estimate.

📝 Example: For a sample of 20 observations, the sample mean xˉ=∑xi/n\bar{x} = \sum x_i / n is a point estimate for the population mean μ\mu.

11.2 Desirable properties of estimators

Good estimators should have specific properties to ensure reliable estimates.

  • Unbiasedness: An estimator is unbiased if its expected value equals the population parameter. This means, on average, it hits the target.

    • E(θ^)=θE(\hat{\theta}) = \theta
  • Minimum variance: Among unbiased estimators, the one with the smallest variance is preferred. This reduces the spread of estimates across different samples.

    • The Minimum Variance Unbiased Estimator (MVUE) is the unbiased estimator with the smallest variance.

🔑 Important: Unbiasedness alone is not enough; an estimator that is always wrong but never varies is worse than one that is sometimes wrong but has a small, consistent spread around the true value 185.

11.3 Common estimators and their uses

Several statistics are commonly used as point estimators for population parameters.

ParameterCommon EstimatorProperty
Population Mean (μ\mu)Sample Mean (xˉ\bar{x})Unbiased
Population Variance (σ2\sigma^2)Sample Variance (s2s^2)Unbiased
Population Std. Dev. (σ\sigma)Sample Std. Dev. (ss)Biased (slightly underestimates)
  • The sample mean (xˉ\bar{x}) is a widely used unbiased estimator for the population mean (μ\mu) 186.

11.4 Estimating parameters with examples

Let's look at how estimators are applied.

📝 Example: To estimate μ\mu from observations X1,…,X20X_1, \ldots, X_{20} from a normal distribution:

  • Estimator μ^=xˉ\hat{\mu} = \bar{x}: estimate = 27.793
  • Estimator μ^=(X1+X2)/2\hat{\mu} = (X_1 + X_2)/2: estimate = 27.960
  • Estimator μ^=(min⁡(Xi)+max⁡(Xi))/2\hat{\mu} = (\min(X_i) + \max(X_i))/2: estimate = 27.670 The best choice depends on which estimator tends to produce estimates closest to the true value across different samples 182 183.

📝 Example: Consider estimators for a slope parameter β\beta. Three unbiased estimators were calculated, yielding estimates of 1.3497, 1.1875, and 1.1222. If β\beta is normally distributed with mean βxi\beta x_i and variance σ2\sigma^2, the estimator β^=∑xiYi/∑xi2\hat{\beta} = \sum x_i Y_i / \sum x_i^2 has the smallest variance and is the MVUE 189 190.

📝 Example: For a random sample X1,…,XnX_1, \ldots, X_n from a uniform distribution on [0,θ][0, \theta], the estimator θ^=2Xˉ\hat{\theta} = 2\bar{X} is unbiased for θ\theta. This is because E(Xi)=θ/2E(X_i) = \theta/2, so E(Xˉ)=θ/2E(\bar{X}) = \theta/2 193.

📝 Example: If the number of scratches per item (XX) follows a Poisson distribution with parameter λ\lambda, then Xˉ\bar{X} is an unbiased estimator for λ\lambda. For data with xˉ=2.11\bar{x} = 2.11 from 150 items, the estimate for λ\lambda is 2.11. The standard error of this estimator is λ/n\sqrt{\lambda/n}. The estimated standard error is 2.11/150≈0.119\sqrt{2.11/150} \approx 0.119 195.

🔑 Important: The sample mean (Xˉ\bar{X}) is a fundamental unbiased estimator for the population mean (μ\mu), and its standard error (σ/n\sigma/\sqrt{n}) quantifies the precision of this estimate 196.

12. Sampling distributions and the Central Limit Theorem (part 4)

12.1 Independent and identically distributed (IID) random variables

  • A random sample of size nn refers to nn random variables X1,…,XnX_1, \dots, X_n.
  • These variables must be independent of each other.
  • They must also come from the same probability distribution.
  • This is known as being independent and identically distributed (IID).

12.2 Estimating population parameters

  • An estimator is a rule used to calculate a value for a population parameter from sample data.
  • An unbiased estimator is one whose expected value equals the true population parameter.

The expected value of an estimator being equal to the parameter is key for it to be unbiased.

  • Consider a random sample X1,…,XnX_1, \dots, X_n from a distribution.
  • Let θ\theta be a population parameter we want to estimate.
  • We are given an estimator θ^\hat{\theta} for θ\theta.
  • If E(θ^)=θE(\hat{\theta}) = \theta, then θ^\hat{\theta} is an unbiased estimator of θ\theta.

12.2.1 Example of an unbiased estimator

  • Suppose X1,…,XnX_1, \dots, X_n is a random sample from a distribution with parameter θ\theta.
  • The mean of the distribution is μ\mu.
  • We are given an estimator θ^=3Xˉ\hat{\theta} = 3\bar{X}, where Xˉ\bar{X} is the sample mean.
  • We want to show that θ^\hat{\theta} is an unbiased estimator of θ\theta.

Calculating the expected value of the estimator

  • First, compute the expected value of the sample mean, Xˉ\bar{X}.
  • E(Xˉ)=μE(\bar{X}) = \mu
  • If the population mean is μ=θ/3\mu = \theta/3, then E(Xˉ)=θ/3E(\bar{X}) = \theta/3.

The relationship between the sample mean and the population mean is central to proving unbiasedness.

  • Now, compute the expected value of θ^\hat{\theta}: E(θ^)=E(3Xˉ)E(\hat{\theta}) = E(3\bar{X})

  • Using the property of expectation, E(cX)=cE(X)E(c X) = c E(X): E(θ^)=3E(Xˉ)E(\hat{\theta}) = 3 E(\bar{X})

  • Substitute the expected value of Xˉ\bar{X}: E(θ^)=3(θ/3)E(\hat{\theta}) = 3 (\theta/3)

  • This simplifies to: E(θ^)=θE(\hat{\theta}) = \theta

  • Therefore, θ^=3Xˉ\hat{\theta} = 3\bar{X} is an unbiased estimator of θ\theta when E(X)=θ/3E(X) = \theta/3 197 198.

🔑 Important: An estimator is unbiased if its expected value perfectly matches the true population parameter it aims to estimate.

📝 Example: If you're trying to estimate the average height of students in a university (population parameter θ\theta), and you take the average height of a sample of 100 students (Xˉ\bar{X}), an estimator like θ^=1.5Xˉ\hat{\theta} = 1.5 \bar{X} is unbiased if the true average height of all students is 1.51.5 times the average height of your sample.

🔑 Important: The Central Limit Theorem (CLT) ensures that for large sample sizes, the distribution of sample means approaches a normal distribution, regardless of the original population's distribution. This is crucial for inference.

🔑 Important: Inference concerning a mean often relies on understanding how sample statistics (like the sample mean) behave in relation to population parameters. Sampling distributions are the foundation for this.

13. Statistical inference and estimation (part 1)

13.1 Maximum likelihood estimation

Maximum Likelihood Estimation (MLE) is a core method for estimating parameters of a statistical model. It finds parameter values that make the observed data most probable.

The goal is to maximize the likelihood function, often by maximizing its logarithm for computational ease 205.

13.1.1 Steps for MLE

  1. Obtain a random sample: Collect data points X1,X2,…,XnX_1, X_2, \dots, X_n from the distribution with density f(x;θ)f(x; \theta).
  2. Define the likelihood function: This is the product of the densities for each data point: L(θ)=f(x1;θ)⋅f(x2;θ)…f(xn;θ)L(\theta) = f(x_1; \theta) \cdot f(x_2; \theta) \dots f(x_n; \theta).
  3. Maximize the likelihood function: Find θ\theta that maximizes L(θ)L(\theta). This is often done by maximizing the log-likelihood function, ln⁡L(θ)\ln L(\theta).
  4. Obtain the estimator: Replace θ\theta with its maximum likelihood estimator, denoted as θ^\hat{\theta}.
  5. Calculate the observed value: Use the sample data to find the numerical value of θ^\hat{\theta} 206.

13.1.2 MLE for Normal Distribution

For a random sample from a normal distribution with mean μ\mu and variance σ2\sigma^2, the MLEs are:

ParameterMLE (⋅^\hat{\cdot})Formula
Meanμ^\hat{\mu}1n∑i=1nxi=xˉ\frac{1}{n} \sum_{i=1}^n x_i = \bar{x}
Varianceσ^2\hat{\sigma}^21n∑i=1n(xi−xˉ)2\frac{1}{n} \sum_{i=1}^n (x_i - \bar{x})^2

To find these, we take partial derivatives of the log-likelihood function with respect to μ\mu and σ\sigma, set them to zero, and solve 208 210.

13.1.3 MLE for Binomial Distribution

For a sample of size mm from a binomial distribution with parameters nn (known) and pp (unknown), the MLE for pp is the sample mean divided by nn:

  • MLE for pp: p^=∑i=1mximn=xˉn\hat{p} = \frac{\sum_{i=1}^m x_i}{mn} = \frac{\bar{x}}{n} 214.

13.1.4 MLE for Exponential Distribution

For a sample of size nn from an exponential distribution with parameter λ\lambda (unknown), the MLE for λ\lambda is the reciprocal of the sample mean:

  • MLE for λ\lambda: λ^=n∑i=1nxi=1xˉ\hat{\lambda} = \frac{n}{\sum_{i=1}^n x_i} = \frac{1}{\bar{x}} 217.

13.1.5 MLE for Rayleigh Distribution

For a sample from a Rayleigh distribution with parameter θ\theta, the PDF is f(x;θ)=xθe−x22θf(x; \theta) = \frac{x}{\theta} e^{-\frac{x^2}{2\theta}} for x>0x > 0. The MLE for θ\theta is:

  • MLE for θ\theta: θ^=∑i=1nxi22n\hat{\theta} = \frac{\sum_{i=1}^n x_i^2}{2n} 223.

🔑 Important: MLE finds parameter values that make the observed data most likely, often simplifying calculations using the log-likelihood.

13.2 Unbiased estimators

An estimator is unbiased if its expected value equals the true parameter value. This means, on average, the estimator does not systematically overestimate or underestimate the parameter.

For a random sample X1,…,XnX_1, \dots, X_n from a Rayleigh distribution with parameter θ\theta, we know E(X2)=2θE(X^2) = 2\theta. An unbiased estimator for θ\theta can be constructed using the expected value of X2X^2:

  • Unbiased estimator for θ\theta: θ^unbiased=12n∑i=1nXi2\hat{\theta}_{\text{unbiased}} = \frac{1}{2n} \sum_{i=1}^n X_i^2 218 219.
    • This is shown to be unbiased because E(θ^unbiased)=E(12n∑i=1nXi2)=12n∑i=1nE(Xi2)=12n∑i=1n(2θ)=12n(n⋅2θ)=θE(\hat{\theta}_{\text{unbiased}}) = E\left(\frac{1}{2n} \sum_{i=1}^n X_i^2\right) = \frac{1}{2n} \sum_{i=1}^n E(X_i^2) = \frac{1}{2n} \sum_{i=1}^n (2\theta) = \frac{1}{2n} (n \cdot 2\theta) = \theta.

🔑 Important: An unbiased estimator has an expected value equal to the true parameter, ensuring no systematic error in estimation.

🔑 Important: The MLE for θ\theta in the Rayleigh distribution (θ^=∑xi22n\hat{\theta} = \frac{\sum x_i^2}{2n}) is the same as the unbiased estimator.

14. Statistical inference and estimation (part 2)

14.1 Interval estimation basics

  • A point estimate gives a single value for a population parameter.
  • However, a point estimate rarely matches the exact parameter value.
  • Interval estimation provides a range of plausible values.
  • It uses a margin of error added to and subtracted from the point estimate.

📝 Example: The formula for an interval estimate is: Point Estimate ±\pm Margin of Error.

  • This margin of error shows how close the point estimate is likely to be to the true parameter value.

14.2 Interval estimation for population mean (μ\mu) when σ\sigma is known

  • This case assumes the population standard deviation (σ\sigma) is known.
  • We use the sample mean (xˉ\bar{x}) as the point estimate for μ\mu.
  • The margin of error depends on σ\sigma and the sample size (nn).
  • The Central Limit Theorem (CLT) is often used here for large samples.

🔑 Important: The interval estimate for μ\mu when σ\sigma is known is given by xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}}.

  • Here, zα/2z_{\alpha/2} is the critical value from the standard normal distribution.
  • It corresponds to the desired confidence level.
  • The confidence level, typically 100(1−α)%100(1-\alpha)\%, indicates the probability that the interval contains the true population mean.

Common confidence levels and their zα/2z_{\alpha/2} values:

Confidence Levelα\alphaα/2\alpha/2zα/2z_{\alpha/2}
90%0.100.051.645
95%0.050.0251.96
99%0.010.0052.576

📝 Example: Compute a 95% confidence interval for the true average porosity of a coal seam.

Given:

  • Sample size (nn) = 20
  • Sample mean porosity (xˉ\bar{x}) = 4.85
  • Population standard deviation (σ\sigma) = 0.75

For 95% CI, zα/2=1.96z_{\alpha/2} = 1.96.

Interval = 4.85±1.96×0.75204.85 \pm 1.96 \times \frac{0.75}{\sqrt{20}} Interval = 4.85±1.96×0.16774.85 \pm 1.96 \times 0.1677 Interval = 4.85±0.32874.85 \pm 0.3287

The 95% confidence interval is (4.5213, 5.1787).

📝 Example: Compute a 98% confidence interval for true average porosity.

Given:

  • Sample size (nn) = 16
  • Sample mean porosity (xˉ\bar{x}) = 4.56
  • Population standard deviation (σ\sigma) = 0.75

For 98% CI, α=0.02\alpha = 0.02, so α/2=0.01\alpha/2 = 0.01. We need z0.01z_{0.01} such that P(Z<z0.01)=0.99P(Z < z_{0.01}) = 0.99. Thus, z0.01=2.33z_{0.01} = 2.33.

Interval = 4.56±2.33×0.75164.56 \pm 2.33 \times \frac{0.75}{\sqrt{16}} Interval = 4.56±2.33×0.18754.56 \pm 2.33 \times 0.1875 Interval = 4.56±0.43694.56 \pm 0.4369

The 98% confidence interval is (4.1231, 4.9969).

📝 Example: A sample of size 50 has a mean of 15.68. The population standard deviation is 3.27. Find the 95% confidence interval for the population mean.

  • n=50n = 50, xˉ=15.68\bar{x} = 15.68, σ=3.27\sigma = 3.27, α=0.05\alpha = 0.05.
  • zα/2=1.96z_{\alpha/2} = 1.96.
  • Interval = 15.68±1.96×3.275015.68 \pm 1.96 \times \frac{3.27}{\sqrt{50}}
  • Interval = 15.68±1.96×0.462415.68 \pm 1.96 \times 0.4624
  • Interval = 15.68±0.906315.68 \pm 0.9063
  • The 95% confidence interval is (14.7737, 16.5863).

14.3 Interval estimation for population mean (μ\mu) when σ\sigma is unknown

  • When the population standard deviation (σ\sigma) is unknown, we use the sample standard deviation (ss) instead.
  • This is the σ\sigma unknown case.
  • In this situation, the confidence interval for μ\mu is based on the t-distribution.
  • We also assume the population is normally distributed for this method.

🔑 Important: The interval estimate for μ\mu when σ\sigma is unknown uses the t-distribution: xˉ±tα/2,n−1sn\bar{x} \pm t_{\alpha/2, n-1} \frac{s}{\sqrt{n}}.

  • tα/2,n−1t_{\alpha/2, n-1} is the critical value from the t-distribution with n−1n-1 degrees of freedom.

🔑 Important: The margin of error in the σ\sigma unknown case is calculated using the sample standard deviation (ss), not the population standard deviation (σ\sigma).

🔑 Important: For interval estimation of the population mean (μ\mu), always use the t-distribution when the population standard deviation (σ\sigma) is unknown.

15. Statistical inference and estimation (part 3)

15.1 The t-distribution

  • The t-distribution is used when estimating the mean of a normally distributed population with an unknown variance, especially with small sample sizes.
  • A random variable tt with n−1n-1 degrees of freedom is defined as: t=X‾−μS/nt = \frac{\overline{X} - \mu}{S/\sqrt{n}} where X‾\overline{X} is the sample mean, SS is the sample standard deviation, nn is the sample size, and μ\mu is the population mean 244.
  • The parameter n−1n-1 is known as the degrees of freedom.

15.1.1 Properties of the t-distribution

  • The density curve is symmetric and bell-shaped, centered at zero.
  • As the degrees of freedom (ν\nu) increase, the variance of the t-distribution decreases 245 246.
  • The t-curve is always more spread out than the standard normal (z) curve.
  • As degrees of freedom approach infinity (ν→∞\nu \to \infty), the t-distribution converges to the standard normal distribution 248 249.
  • The mean of a t-distributed random variable is 0.
  • The variance of a t-distributed random variable is νν−2\frac{\nu}{\nu-2} for ν>2\nu > 2 247.

15.1.2 t-critical values

  • A t-critical value, denoted as tα,nt_{\alpha, n}, is the value on the measurement axis where the area to its right under the t-curve with nn degrees of freedom is α\alpha.
  • For example, t0.05,6t_{0.05, 6} captures an upper-tail area of 0.05 with 6 degrees of freedom 250.

15.2 Interval estimation for the population mean (σ unknown)

  • When the population variance (σ2\sigma^2) is unknown and the sample size is small, the t-distribution is used to construct confidence intervals for the population mean (μ\mu).
  • A 100(1−α)%100(1-\alpha)\% confidence interval for μ\mu is given by: X‾±tα/2,n−1Sn\overline{X} \pm t_{\alpha/2, n-1} \frac{S}{\sqrt{n}} where SS is the sample standard deviation and n−1n-1 are the degrees of freedom.

🔑 Important: This interval is valid if the population is normally distributed or if the sample size is sufficiently large (though the t-distribution is specifically preferred for small samples from normal populations) 251.

15.2.1 Confidence interval calculations

ParameterValueCalculation/Notes
Sample mean (X‾\overline{X})977.51 cm/s²From 7 experiments
Sample size (nn)7Degrees of freedom = n−1=6n-1 = 6
Confidence Level95%α=0.05\alpha = 0.05, so α/2=0.025\alpha/2 = 0.025
t-critical valuet0.025,6=2.447t_{0.025, 6} = 2.447Found from t-distribution table for α/2=0.025\alpha/2=0.025 and df=6df=6
  • The 95% confidence interval for the true value of gg is: 977.51±2.447×4.427977.51 \pm 2.447 \times \frac{4.42}{\sqrt{7}} =977.51±4.06= 977.51 \pm 4.06 giving an interval of (973.45, 981.57) 254.

  • For a sample of n=150n=150 tons of ore with X‾=11\overline{X}=11 pounds and S=3S=3 pounds, a 95% CI for μ\mu is approximately (10.52, 11.48). For large nn, the t-distribution value can be approximated by the z-distribution value, z0.025=1.96z_{0.025} = 1.96 255.

  • For n=17n=17 with X‾=438.29\overline{X}=438.29 and S=15.14S=15.14, the 95% CI for μ\mu uses t0.025,16≈2.120t_{0.025, 16} \approx 2.120: 438.29±2.120×15.1417≈438.29±7.77438.29 \pm 2.120 \times \frac{15.14}{\sqrt{17}} \approx 438.29 \pm 7.77, so CI is (430.52, 446.06) 256.

  • For n=24n=24 sites with X‾=5818\overline{X}=5818 tons and S2=2697S^2=2697 (S≈51.93S \approx 51.93), a 90% CI requires t0.05,23≈1.714t_{0.05, 23} \approx 1.714. The maximum error is: t0.05,23×Sn=1.714×51.9324≈1.714×10.59≈18.15t_{0.05, 23} \times \frac{S}{\sqrt{n}} = 1.714 \times \frac{51.93}{\sqrt{24}} \approx 1.714 \times 10.59 \approx 18.15 tons 257. The 90% CI is 5818±18.155818 \pm 18.15, approximately (5799.85, 5836.15) tons 258.

  • For n=52n=52 orders with X‾=1.865\overline{X}=1.865 hours and S2=1.5623S^2=1.5623 hours (S≈1.250S \approx 1.250), a 95% CI uses z0.025=1.96z_{0.025} = 1.96 (as n>30n>30). The maximum error is: z0.025×Sn=1.96×1.25052≈1.96×0.173≈0.339z_{0.025} \times \frac{S}{\sqrt{n}} = 1.96 \times \frac{1.250}{\sqrt{52}} \approx 1.96 \times 0.173 \approx 0.339 hours 259. The 95% CI is 1.865±0.3391.865 \pm 0.339, approximately (1.526, 2.204) hours 260.

15.3 Large-sample interval estimation for the population mean (σ unknown)

  • If the sample size nn is sufficiently large (typically n>40n > 40), the standardized variable X‾−μS/n\frac{\overline{X} - \mu}{S/\sqrt{n}} approximately follows a standard normal distribution, even if the population is not normal, due to the Central Limit Theorem
  • This allows for a large-sample confidence interval for μ\mu using the z-distribution: X‾±zα/2Sn\overline{X} \pm z_{\alpha/2} \frac{S}{\sqrt{n}} where zα/2z_{\alpha/2} is the critical value from the standard normal distribution for a confidence level of 100(1−α)%100(1-\alpha)\%.

🔑 Important: This formula is valid regardless of the population distribution's shape when the sample size is large 263.

🔑 Important: For large samples (n>30n > 30) and known variance, the CI uses σ\sigma. If variance is unknown, replace σ2\sigma^2 with s2s^2 262.

🔑 Important: The key distinction for small samples and unknown variance is using the t-distribution, while for large samples (even with unknown variance), the z-distribution provides a good approximation due to the Central Limit Theorem.

🔑 Important: The t-distribution is crucial for small sample inference from normal populations with unknown variance, while the z-distribution is used for large samples or when population variance is known. As sample size grows, the t-distribution approaches the z-distribution.

16. Statistical inference and estimation (part 4)

16.1 Confidence intervals for the population mean

When the population standard deviation σ\sigma is known, confidence intervals for the population mean μ\mu are based on the standard normal distribution (ZZ-distribution). The interval is calculated as:

xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}}

Here, xˉ\bar{x} is the sample mean, nn is the sample size, and zα/2z_{\alpha/2} is the critical value from the ZZ-distribution for a desired confidence level 1−α1-\alpha. This value leaves α/2\alpha/2 in each tail of the distribution.

🔑 Important: Use this formula when σ\sigma is known. For unknown σ\sigma, the tt-distribution is used.

Lightning echo duration example

A sample of 110 lightning flashes yielded a mean echo duration of 0.81 seconds and a standard deviation of 0.34 seconds. To calculate a 99% confidence interval for the true average echo duration μ\mu:

  • Sample size n=110n = 110.
  • Sample mean xˉ=0.81\bar{x} = 0.81 seconds.
  • Sample standard deviation s=0.34s = 0.34 seconds.
  • For 99% confidence, α=0.01\alpha = 0.01, so zα/2=z0.005=2.58z_{\alpha/2} = z_{0.005} = 2.58.

The 99% confidence interval is: 0.81±2.580.341100.81 \pm 2.58 \frac{0.34}{\sqrt{110}} 0.81±2.58×0.03250.81 \pm 2.58 \times 0.0325 0.81±0.08390.81 \pm 0.0839 The interval is (0.7261,0.8939)(0.7261, 0.8939) seconds 264.

CO2 level example

For 50 kitchens with gas cooking, the sample mean CO2\text{CO}_2 level was 654.16 ppm with a sample standard deviation of 164.43 ppm. A 95% confidence interval for the true average CO2\text{CO}_2 level is needed.

  • Sample size n=50n = 50.
  • Sample mean xˉ=654.16\bar{x} = 654.16 ppm.
  • Sample standard deviation s=164.43s = 164.43 ppm.
  • For 95% confidence, α=0.05\alpha = 0.05, so zα/2=z0.025=1.96z_{\alpha/2} = z_{0.025} = 1.96.

The 95% confidence interval is: 654.16±1.96164.4350654.16 \pm 1.96 \frac{164.43}{\sqrt{50}} 654.16±1.96×23.256654.16 \pm 1.96 \times 23.256 654.16±45.582654.16 \pm 45.582 The interval is (608.578,699.742)(608.578, 699.742) ppm 265.

16.2 Determining sample size for mean estimation

To determine the required sample size (nn) for estimating the population mean (μ\mu) with a specified margin of error (EE) and confidence level (1−α)(1-\alpha), when σ\sigma is known, the formula is:

n=(zα/2σE)2n = \left(\frac{z_{\alpha/2} \sigma}{E}\right)^2

If σ\sigma is unknown, a preliminary estimate of the population standard deviation (sests_{\text{est}}) can be used:

n=(zα/2sestE)2n = \left(\frac{z_{\alpha/2} s_{\text{est}}}{E}\right)^2

Rounding up to the nearest whole number is necessary as sample size must be an integer.

🔑 Important: The required sample size increases with the desired confidence level (larger zα/2z_{\alpha/2}) and decreases with a larger acceptable margin of error (EE).

Sample size for interval width calculation

Suppose a desired margin of error is EE and the population standard deviation σ\sigma is known. The interval width is 2E2E.

If the desired width is 0.400.40 and σ=0.75\sigma = 0.75 for a 95% confidence level:

  • 2E=0.402E = 0.40, so E=0.20E = 0.20.
  • For 95% confidence, zα/2=1.96z_{\alpha/2} = 1.96.
  • σ=0.75\sigma = 0.75.

n=(1.96×0.750.20)2=(1.470.20)2=(7.35)2≈54.02n = \left(\frac{1.96 \times 0.75}{0.20}\right)^2 = \left(\frac{1.47}{0.20}\right)^2 = (7.35)^2 \approx 54.02

The minimum sample size needed is 55 266 267.

Sample size with estimated standard deviation

If investigators estimate the standard deviation to be sest=175s_{\text{est}} = 175 ppm for a desired interval width of 50 ppm at 95% confidence:

  • 2E=502E = 50, so E=25E = 25 ppm.
  • zα/2=1.96z_{\alpha/2} = 1.96 for 95% confidence.
  • sest=175s_{\text{est}} = 175 ppm.

n=(1.96×17525)2=(34325)2=(13.72)2≈188.238n = \left(\frac{1.96 \times 175}{25}\right)^2 = \left(\frac{343}{25}\right)^2 = (13.72)^2 \approx 188.238

The minimum sample size needed is 189 268.

16.3 Estimation of variance and standard deviation

For a random sample from a normal population, the sample variance (S2S^2) is an unbiased estimator of the population variance (σ2\sigma^2).

The Chi-Squared (χ2\chi^2) distribution

The quantity (n−1)S2σ2\frac{(n-1)S^2}{\sigma^2} follows a chi-squared distribution with n−1n-1 degrees of freedom (df). The χ2\chi^2 distribution is:

  • Non-symmetric.
  • Characterized by its degrees of freedom.
  • It can be recalled as a Gamma distribution with parameters α=(n−1)/2\alpha = (n-1)/2 and β=2\beta = 2.

The χ2\chi^2 distribution is crucial for constructing confidence intervals for population variance and standard deviation 269 270.

Chi-squared critical values

Critical values for the χ2\chi^2 distribution are denoted as χv,α2\chi^2_{v, \alpha}, where vv is the degrees of freedom and α\alpha is the area to the right of the value. Since the distribution is non-symmetric, values for both small and large α\alpha are needed.

The lower critical value for a 1−α1-\alpha confidence interval is χ1−α/2,n−12\chi^2_{1-\alpha/2, n-1}, and the upper critical value is χα/2,n−12\chi^2_{\alpha/2, n-1}.

🔑 Important: Use χ2\chi^2 tables or software to find these critical values. The notation χ1−α/2,v2\chi^2_{1-\alpha/2, v} means the value that leaves α/2\alpha/2 in the right tail.

Confidence intervals for variance

A 100(1−α)%100(1-\alpha)\% confidence interval for the population variance (σ2\sigma^2) is given by:

((n−1)S2χα/2,n−12,(n−1)S2χ1−α/2,n−12)\left( \frac{(n-1)S^2}{\chi^2_{\alpha/2, n-1}}, \frac{(n-1)S^2}{\chi^2_{1-\alpha/2, n-1}} \right)

This can also be written as:

((n−1)S2χα/2,n−12,nS2χ1−α/2,n−12)\left( \frac{(n-1)S^2}{\chi^2_{\alpha/2, n-1}}, \frac{nS^2}{\chi^2_{1-\alpha/2, n-1}} \right)

where S2S^2 is the sample variance and n−1n-1 is the degrees of freedom 273 274.

Variance interval example

For a sample of size n=7n=7 with sample variance S2=13.1S^2 = 13.1 from a normal population:

  • Degrees of freedom df=n−1=6df = n-1 = 6.
  • For a 95% confidence interval, α=0.05\alpha = 0.05, so α/2=0.025\alpha/2 = 0.025 and 1−α/2=0.9751-\alpha/2 = 0.975.
  • From χ2\chi^2 tables, χ0.975,62≈1.237\chi^2_{0.975, 6} \approx 1.237 and χ0.025,62≈14.449\chi^2_{0.025, 6} \approx 14.449.

The 95% CI for σ2\sigma^2 is: (6×13.114.449,6×13.11.237)\left( \frac{6 \times 13.1}{14.449}, \frac{6 \times 13.1}{1.237} \right) (78.614.449,78.61.237)\left( \frac{78.6}{14.449}, \frac{78.6}{1.237} \right) (5.439,63.541)(5.439, 63.541) So, 5.439<σ2<63.5415.439 < \sigma^2 < 63.541 275.

Confidence intervals for standard deviation

A 100(1−α)%100(1-\alpha)\% confidence interval for the population standard deviation (σ\sigma) is obtained by taking the square root of the confidence interval for σ2\sigma^2:

((n−1)S2χα/2,n−12,(n−1)S2χ1−α/2,n−12)\left( \sqrt{\frac{(n-1)S^2}{\chi^2_{\alpha/2, n-1}}}, \sqrt{\frac{(n-1)S^2}{\chi^2_{1-\alpha/2, n-1}}} \right)

This is equivalent to:

(Sχα/2,n−1,Sχ1−α/2,n−1)\left( \frac{S}{\chi_{\alpha/2, n-1}}, \frac{S}{\chi_{1-\alpha/2, n-1}} \right)

where SS is the sample standard deviation 277.

Standard deviation interval example

For a sample of n=9n=9 welds, the sample standard deviation was s=2.81s = 2.81 mils. Assuming normality, derive a 95% CI for σ2\sigma^2 and σ\sigma.

  • Degrees of freedom df=n−1=8df = n-1 = 8.
  • For 95% confidence, χ0.975,82≈2.180\chi^2_{0.975, 8} \approx 2.180 and χ0.025,82≈20.090\chi^2_{0.025, 8} \approx 20.090.
  • S2=(2.81)2≈7.8961S^2 = (2.81)^2 \approx 7.8961.

95% CI for σ2\sigma^2: ((9−1)×7.896120.090,(9−1)×7.89612.180)\left( \frac{(9-1) \times 7.8961}{20.090}, \frac{(9-1) \times 7.8961}{2.180} \right) (8×7.896120.090,8×7.89612.180)\left( \frac{8 \times 7.8961}{20.090}, \frac{8 \times 7.8961}{2.180} \right) (63.168820.090,63.16882.180)\left( \frac{63.1688}{20.090}, \frac{63.1688}{2.180} \right) (3.144,28.976)(3.144, 28.976) So, 3.144<σ2<28.9763.144 < \sigma^2 < 28.976.

95% CI for σ\sigma: Take the square root of the σ2\sigma^2 interval limits: (3.144,28.976)\left( \sqrt{3.144}, \sqrt{28.976} \right) (1.773,5.383)(1.773, 5.383) So, 1.773<σ<5.3831.773 < \sigma < 5.383 mils 278 279.

🔑 Important: The confidence interval for the standard deviation is derived directly from the variance interval by taking the square root of its endpoints.

🔑 Important: The accuracy of these confidence intervals relies on the assumption that the population is normally distributed.

17. Statistical inference and estimation (part 5)

17.1 Confidence intervals for variance and standard deviation

Confidence intervals for the population variance (σ2\sigma^2) and standard deviation (σ\sigma) assume the population follows a normal distribution. These intervals are based on the chi-squared (χ2\chi^2) distribution.

The χ2\chi^2 distribution is non-symmetric and is characterized by its degrees of freedom (df). Critical values from the χ2\chi^2 distribution are needed to construct the confidence intervals.

Appendix tables for the χ2\chi^2 distribution provide these values, noting that they differ for areas in both the left and right tails.

A χ2\chi^2 critical value, denoted as χv,α2\chi^2_{v, \alpha}, represents the point on the horizontal axis such that α\alpha of the area under the χ2\chi^2 curve with vv degrees of freedom lies to its right.

The χ2\chi^2 distribution is used for variance and standard deviation inference when the population is normal.

A table summarizes the confidence intervals for σ2\sigma^2 and σ\sigma.

ParameterConfidence Interval Formula
σ2\sigma^2\left[ \frac{(n-1)s^2}{\chi^2_{v, \alpha/2}}, \frac{(n-1)s^2}{\chi^2_{v, 1-\alpha/2}} \right
σ\sigma\left[ \sqrt{\frac{(n-1)s^2}{\chi^2_{v, \alpha/2}}}, \sqrt{\frac{(n-1)s^2}{\chi^2_{v, 1-\alpha/2}}} \right

Where:

  • nn is the sample size.
  • s2s^2 is the sample variance.
  • v=n−1v = n-1 are the degrees of freedom.
  • χv,α/22\chi^2_{v, \alpha/2} and χv,1−α/22\chi^2_{v, 1-\alpha/2} are the critical values from the χ2\chi^2 distribution for a (1−α)(1-\alpha) confidence level.

Key relationship: The confidence interval for σ\sigma is simply the square root of the confidence interval for σ2\sigma^2.

17.1.1 Example: Confidence interval for variance

The amount of lateral expansion in pulsed-power gas metal arc welds was measured. For a sample of n=9n=9 welds, the sample standard deviation was s=2.81s = 2.81 mils.

Assuming normality, derive a 95% confidence interval for σ2\sigma^2 and σ\sigma.

  • Degrees of freedom: v=n−1=9−1=8v = n-1 = 9-1 = 8.
  • For a 95% confidence interval (1−α=0.951-\alpha = 0.95), α=0.05\alpha = 0.05. Thus, α/2=0.025\alpha/2 = 0.025.
  • We need χ8,0.0252\chi^2_{8, 0.025} and χ8,0.9752\chi^2_{8, 0.975}. From χ2\chi^2 tables, χ8,0.0252≈15.507\chi^2_{8, 0.025} \approx 15.507 and χ8,0.9752≈2.733\chi^2_{8, 0.975} \approx 2.733.
  • The sample variance is s2=(2.81)2≈7.896s^2 = (2.81)^2 \approx 7.896.

The 95% confidence interval for σ2\sigma^2 is calculated using the formula.

  • 95% CI for σ2\sigma^2: \left[ \frac{ (7.896)}{15.507}, \frac{ (7.896)}{2.733} \right \approx [4.07, 23.08 8.
  • 95% CI for σ\sigma: \left[ \sqrt{4.07}, \sqrt{23.08} \right \approx [2.02, 4.80

17.2 Hypothesis testing introduction

Hypothesis testing is a statistical method used to make decisions about population parameters based on sample data. It involves formulating two opposing statements, called hypotheses, and using evidence to determine which statement is more likely true.

17.2.1 Hypotheses and test procedures

A statistical hypothesis is a claim or assertion about a population parameter or the form of a probability distribution. In any hypothesis-testing problem, two contradictory hypotheses are considered.

  • Null hypothesis (H0H_0): This is the claim that is initially assumed to be true; it represents a preconceived notion about the parameter value. It is the hypothesis to be contested.
  • Alternative hypothesis (HaH_a or H1H_1): This is the claim that contradicts the null hypothesis. It is the assertion that the researcher wishes to establish or validate.

The objective is to use sample information to decide which of the two hypotheses is correct.

Analogy: In a legal trial, the null hypothesis (H0H_0) is that the defendant is innocent. The alternative hypothesis (HaH_a) is that the defendant is guilty.

The jury's decision is based on whether there is enough evidence to support the alternative hypothesis. If the jury acquits, it means there is not enough evidence to support the claim of guilt, not that the defendant is definitively innocent.

Similarly, in hypothesis testing, we "fail to reject H0H_0" rather than "accept H0H_0."

17.2.2 Types of alternative hypotheses

The alternative hypothesis (HaH_a) can take one of three forms, depending on the researcher's claim about a parameter θ\theta relative to a specified null value θ0\theta_0:

  • Right-tailed test: Ha:θ>θ0H_a: \theta > \theta_0. This implies the null hypothesis is implicitly H0:θ≤θ0H_0: \theta \le \theta_0.
  • Left-tailed test: Ha:θ<θ0H_a: \theta < \theta_0. This implies the null hypothesis is implicitly H0:θ≥θ0H_0: \theta \ge \theta_0.
  • Two-tailed test: Ha:θ≠θ0H_a: \theta \ne \theta_0. This is used when we are interested in deviations from θ0\theta_0 in either direction.

The null hypothesis (H0H_0) is generally stated as an equality claim, e.g., θ=θ0\theta = \theta_0.

🔑 Important: When conducting hypothesis tests, we aim to find evidence against the null hypothesis in favor of the alternative hypothesis. We never "accept" the null hypothesis; we either reject it or fail to reject it.

🔑 Important: The alternative hypothesis is often referred to as the "researcher's hypothesis" because it represents the claim the researcher wants to prove.

18. Statistical inference and estimation (part 6)

18.1 Hypothesis testing framework

A statistical test involves two main components to decide on the null hypothesis (H0H_0).

  • Test statistic: This is a value calculated from sample data used for decision-making.
  • Rejection region: This is the set of test statistic values that lead to rejecting H0H_0.

H0H_0 is rejected if the calculated test statistic falls within the rejection region 304.

18.2 Types of errors in hypothesis testing

When testing hypotheses, two types of errors can occur:

  • Type I error: Rejecting H0H_0 when it is actually true. Its probability is denoted by α\alpha, the significance level.
  • Type II error: Failing to reject H0H_0 when it is actually false. Its probability is denoted by β\beta 307.

The power of a test is the probability of correctly rejecting a false H0H_0, calculated as 1−β1 - \beta 305.

Key Relationship: Type I error is about wrongly rejecting a true statement; Type II error is about wrongly accepting a false statement.

18.3 Hypothesis formulation and test types

Hypotheses are set up to test claims about population parameters.

  • Null hypothesis (H0H_0): A statement of no effect or no difference.
  • Alternative hypothesis (HaH_a or H1H_1): A statement that contradicts the null hypothesis, often representing the researcher's claim.

Tests can be:

  • Left-tailed test: HaH_a has a '<' sign (e.g., Ha:μ<μ0H_a: \mu < \mu_0).
  • Right-tailed test: HaH_a has a '>' sign (e.g., Ha:μ>μ0H_a: \mu > \mu_0).
  • Two-tailed test: HaH_a has a '≠\neq' sign (e.g., Ha:μ≠μ0H_a: \mu \neq \mu_0) 308.

18.3.1 Formulating hypotheses: Examples

Here are examples of formulating hypotheses based on a claim:

📝 Example: A civil engineer wants to show that building a two-storey house takes less than 6 months on average (μ\mu).

  • H0:μ=6H_0: \mu = 6 months
  • Ha:μ<6H_a: \mu < 6 months 312.

📝 Example: A clutch manufacturer claims their product lasts beyond 50,000 miles on average (μ\mu).

  • H0:μ=50,000H_0: \mu = 50,000 miles
  • Ha:μ>50,000H_a: \mu > 50,000 miles 313.

18.4 Steps in hypothesis testing

A structured approach ensures a valid hypothesis test.

  • Step 1: Set up the null (H0H_0) and alternative (HaH_a) hypotheses. Choose the appropriate statistical test.
  • Step 2: Identify the critical value(s) based on the significance level (α\alpha).
  • Step 3: Define the rejection region using the critical value(s).
  • Step 4: Collect sample data and compute the test statistic.
  • Step 5: Draw a conclusion: Reject H0H_0 if the test statistic falls in the rejection region; otherwise, do not reject H0H_0 314.

18.5 Choosing the correct test statistic

The choice of test statistic depends on sample size and whether the population standard deviation (σ\sigma) is known.

ScenarioPopulation DistributionSample Sizeσ\sigmaTest Statistic
Small sample, normal populationNormalSmall (n<30n<30)KnownZ-test
Large sample, distribution unknownUnknownLarge (n>30n>30)Known/UnknownZ-test
Small sample, normal populationNormalSmall (n<30n<30)Unknownt-test

Note: For large samples (n>30n>30), the Central Limit Theorem often allows using Z-tests even if the population distribution is unknown 316.

18.6 Hypothesis testing for a single mean (μ\mu)

The process varies slightly based on whether σ\sigma is known and sample size.

  • When σ\sigma is known (large or small sample, normal population):

    • Use the Z-statistic: Zcalc=xˉ−μ0σ/nZ_{calc} = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}
    • Rejection rules:
      • Left-tailed: Reject H0H_0 if Zcalc<−ZαZ_{calc} < -Z_\alpha.
      • Right-tailed: Reject H0H_0 if Zcalc>ZαZ_{calc} > Z_\alpha.
      • Two-tailed: Reject H0H_0 if Zcalc<−Zα/2Z_{calc} < -Z_{\alpha/2} or Zcalc>Zα/2Z_{calc} > Z_{\alpha/2} 317.
  • When σ\sigma is unknown (small sample, normal population):

    • Use the t-statistic: tcalc=xˉ−μ0s/nt_{calc} = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}, where ss is the sample standard deviation.
    • Degrees of freedom (dfdf) = n−1n-1.
    • Rejection rules:
      • Left-tailed: Reject H0H_0 if tcalc<−tα,dft_{calc} < -t_{\alpha, df}.
      • Right-tailed: Reject H0H_0 if tcalc>tα,dft_{calc} > t_{\alpha, df}.
      • Two-tailed: Reject H0H_0 if tcalc<−tα/2,dft_{calc} < -t_{\alpha/2, df} or tcalc>tα/2,dft_{calc} > t_{\alpha/2, df} 318.

18.6.1 Illustrative examples of hypothesis testing

📝 Example: Coca-Cola knows yield (μ\mu) is normally distributed with σ=96\sigma = 96. A modified process yields 435 units from a sample of n=50n=50. Test if the modified process decreased yield at a 1% significance level.

  • Step 1: H0:μ=500H_0: \mu = 500, Ha:μ<500H_a: \mu < 500 (Left-tailed).
  • Step 2: Calculate Zcalc=435−50096/50≈−4.79Z_{calc} = \frac{435 - 500}{96/\sqrt{50}} \approx -4.79.
  • Step 3: At α=0.01\alpha = 0.01, Z0.01=2.33Z_{0.01} = 2.33. For a left-tailed test, the critical value is −Z0.01=−2.33-Z_{0.01} = -2.33.
  • Step 4: Since Zcalc(−4.79)<−Z0.01(−2.33)Z_{calc} (-4.79) < -Z_{0.01} (-2.33), reject H0H_0. The modified process likely decreased yield 322.

📝 Example: A store manager considers a new billing system cost-effective if the mean monthly account (μ\mu) is over 170 dollars. A sample of n=400n=400 accounts has a mean of 178 dollars. The accounts are normally distributed with s=65s=65 dollars. Test at a 5% significance level.

  • Step 1: H0:μ≤170H_0: \mu \le 170 dollars, Ha:μ>170H_a: \mu > 170 dollars (Right-tailed).
  • The problem provides the setup but not the full solution. Here, since nn is large and σ\sigma is unknown (using ss), a Z-test would be appropriate 323.

🔑 Important: Always match the type of test (left, right, two-tailed) to the alternative hypothesis (HaH_a).

🔑 Important: For hypothesis testing on a mean, use Z-tests when σ\sigma is known or nn is large. Use t-tests when σ\sigma is unknown and nn is small.

🔑 Important: The significance level (α\alpha) dictates the threshold for rejecting the null hypothesis. A smaller α\alpha makes it harder to reject H0H_0.

🔑 Important: A Type I error probability (α\alpha) is set before the test, while a Type II error probability (β\beta) depends on the true value of the parameter being tested.

19. Statistical inference and estimation (part 7)

19.1 Hypothesis testing examples

  • Null hypothesis (H0H_0): The drug has no effect on blood pressure change (μ=0\mu = 0).
  • Alternative hypothesis (HaH_a): The drug affects blood pressure change (μ≠0\mu \neq 0). This is a two-tailed test.
  • Significance level: 5% (or α=0.05\alpha = 0.05).
  • Data: 10 patients, blood pressure increments: 3, 6, -2, 4, -4, 1, -6, 0, 0, 2.
  • Assumption: Population is normal with variance σ2=1\sigma^2 = 1.

The calculation of the test statistic and critical value would be performed here, leading to a decision to reject or fail to reject H0H_0 324.


  • Scenario: Weekly magazine sales increased after an advertisement campaign.

  • Previous mean sales: μ=146\mu = 146 units.

  • New mean sales (22 stores): xˉ=154\bar{x} = 154 units.

  • Standard deviation: s=15s = 15 units.

  • Significance level: 5% (α=0.05\alpha = 0.05).

  • Assumption: Weekly sales follow a normal distribution.

  • Null hypothesis (H0H_0): The advertisement had no effect (μ=146\mu = 146).

  • Alternative hypothesis (HaH_a): The advertisement was successful (μ>146\mu > 146). This is a right-tailed test.

The calculated t-statistic (tcalt_{cal}) is compared to the critical t-value (tα,n−1t_{\alpha, n-1}). If tcal>tα,n−1t_{cal} > t_{\alpha, n-1}, reject H0H_0 325.


  • Context: Investigating coating weights for large pipes in a galvanized coating process.

  • Production standard: True average weight μ=200\mu = 200 lb per pipe.

  • Sample data (30 pipes): Mean xˉ=206.73\bar{x} = 206.73 lb, Standard Deviation s=6.35s = 6.35 lb.

  • Assumption: Normal probability plot of data is straight.

  • Significance level: 5% (α=0.05\alpha = 0.05).

  • Null hypothesis (H0H_0): The average weight is 200 lb (μ=200\mu = 200).

  • Alternative hypothesis (HaH_a): The average weight is not 200 lb (μ≠200\mu \neq 200). This is a two-tailed test.

  • Test statistic: tcal=xˉ−μs/n=206.73−2006.35/30≈5.80t_{cal} = \frac{\bar{x} - \mu}{s / \sqrt{n}} = \frac{206.73 - 200}{6.35 / \sqrt{30}} \approx 5.80.

  • Critical value: For a two-tailed test at 5% significance with n−1=29n-1=29 degrees of freedom, t0.025,29≈2.045t_{0.025, 29} \approx 2.045.

Since tcal(5.80)>t0.025,29(2.045)t_{cal} (5.80) > t_{0.025, 29} (2.045), we reject the null hypothesis. There is enough evidence to conclude the average weight is not 200 lb. 326 327.

19.2 Calculating Type II error probability (β\beta) and sample size

19.2.1 Calculating β\beta for a normal population with known σ\sigma

  • Scenario: Testing H0:μ≤μ0H_0: \mu \leq \mu_0 against Ha:μ>μ0H_a: \mu > \mu_0 (right-tailed test).

  • Rejection region: zcal>zαz_{cal} > z_\alpha. This means xˉ>μ0+zασn\bar{x} > \mu_0 + z_\alpha \frac{\sigma}{\sqrt{n}}.

  • H0H_0 not rejected if: xˉ≤μ0+zασn\bar{x} \leq \mu_0 + z_\alpha \frac{\sigma}{\sqrt{n}}.

  • Type II error (β\beta): Occurs when H0H_0 is true but is not rejected. This means the true mean μ\mu is actually μ′\mu', but our sample mean xˉ\bar{x} falls into the non-rejection region.

  • β\beta calculation: For a specific alternative mean μ′\mu', β\beta is the probability that the observed xˉ\bar{x} falls in the acceptance region, given μ=μ′\mu = \mu'. P(xˉ≤μ0+zασn∣μ=μ′)P(\bar{x} \leq \mu_0 + z_\alpha \frac{\sigma}{\sqrt{n}} | \mu = \mu') This is often rewritten using zz-scores as: P(Z≤(μ0+zασn)−μ′σ/n)=P(Z≤zα−μ′−μ0σ/n)P\left(Z \leq \frac{(\mu_0 + z_\alpha \frac{\sigma}{\sqrt{n}}) - \mu'}{\sigma / \sqrt{n}}\right) = P\left(Z \leq z_\alpha - \frac{\mu' - \mu_0}{\sigma / \sqrt{n}}\right) 329 330.

19.2.2 Determining required sample size

  • Goal: Achieve a specific Type II error probability β\beta for a given alternative value μ′\mu'.
  • One-tailed test (upper or lower): The required sample size nn is found by solving for nn in the equation: zα+zβ=μ′−μ0σ/nz_\alpha + z_\beta = \frac{\mu' - \mu_0}{\sigma / \sqrt{n}}
  • Two-tailed test (approximate): zα/2+zβ=∣μ′−μ0∣σ/nz_{\alpha/2} + z_\beta = \frac{|\mu' - \mu_0|}{\sigma / \sqrt{n}}
  • Note: The sample size nn must be an integer, so always round up 331.

📝 Example: Test H0:μ=30,000H_0: \mu = 30,000 vs Ha:μ>30,000H_a: \mu > 30,000. Sample size n=16n=16, σ=1500\sigma = 1500, α=0.01\alpha = 0.01 (zα=2.33z_\alpha = 2.33). Calculate β\beta when μ′=31,000\mu' = 31,000: zcal=31000−300001500/16=10001500/4=1000375=2.67z_{cal} = \frac{31000 - 30000}{1500 / \sqrt{16}} = \frac{1000}{1500/4} = \frac{1000}{375} = 2.67. β=P(Z≤2.67−2.33)=P(Z≤0.34)≈0.3669\beta = P(Z \leq 2.67 - 2.33) = P(Z \leq 0.34) \approx 0.3669. 332 333.

📝 Example: Find nn for β=0.1\beta = 0.1 when μ′=31,000\mu' = 31,000. zβ=z0.1=1.28z_\beta = z_{0.1} = 1.28. n≈((zα+zβ)σμ′−μ0)2=((2.33+1.28)×150031000−30000)2=(3.61×15001000)2=(5.415)2≈29.32n \approx \left(\frac{(z_\alpha + z_\beta)\sigma}{\mu' - \mu_0}\right)^2 = \left(\frac{(2.33 + 1.28) \times 1500}{31000 - 30000}\right)^2 = \left(\frac{3.61 \times 1500}{1000}\right)^2 = (5.415)^2 \approx 29.32. So, n=30n = 30 tires are needed 334.

19.3 Introduction to Simple Linear Regression

  • Objective: To find the "best-fit" line for observed data points (x,y)(x, y).
  • Linear relationship: The simplest deterministic model is y=β0+β1xy = \beta_0 + \beta_1x.
    • β1\beta_1: slope of the line.
    • β0\beta_0: y-intercept.
  • Probabilistic model: When variables are not deterministically related, for a fixed xx, yy has uncertainty. A linear probabilistic model accounts for this. [338-343]

🔑 Important: Statistical inference and estimation are crucial for making decisions about populations based on sample data. Understanding hypothesis testing and the power of tests ( β\beta and sample size determination) are key exam topics. [324-334]

20. Statistical inference and estimation (part 8)

20.1 Introduction to linear regression

  • The simple linear regression model relates a dependent variable YY to an independent variable xx.
  • Data consists of nn pairs (x1,y1),…,(xn,yn)(x_1, y_1), \dots, (x_n, y_n).
  • A scatter plot visually represents this data. It helps assess if a linear trend exists.

Scatter plot: Visualizes bivariate data to reveal linear trends.

20.2 The linear probabilistic model

  • The model is Yi=β0+β1xi+ϵiY_i = \beta_0 + \beta_1x_i + \epsilon_i.
  • β0\beta_0 is the intercept, β1\beta_1 is the slope.
  • ϵi\epsilon_i is a random error term. It is normally distributed with E(ϵi)=0E(\epsilon_i) = 0 and V(ϵi)=σ2V(\epsilon_i) = \sigma^2.

Model components:

  • YiY_i: Dependent variable (random)
  • xix_i: Independent variable (fixed)
  • β0,β1\beta_0, \beta_1: Population parameters
  • ϵi\epsilon_i: Random error term
  • The true regression line is y=β0+β1xy = \beta_0 + \beta_1x.
  • The error term accounts for deviations of observed points from this line.
  • Y1,…,YnY_1, \dots, Y_n are independent because the ϵi\epsilon_i's are independent.

20.3 Estimating model parameters

  • The principle of least squares is used to estimate β0\beta_0 and β1\beta_1.
  • It minimizes the sum of squared vertical deviations between observed points and the regression line.

Least squares principle: Minimizes the sum of squared errors (∑ei2\sum e_i^2).

  • The vertical deviation for a point (xi,yi)(x_i, y_i) is ei=yi−(b0+b1xi)e_i = y_i - (b_0 + b_1x_i).
  • We seek b0b_0 and b1b_1 that minimize f(b0,b1)=∑i=1nei2f(b_0, b_1) = \sum_{i=1}^n e_i^2.

Formula for sum of squared deviations: S(b0,b1)=∑i=1n[yi−(b0+b1xi)]2S(b_0, b_1) = \sum_{i=1}^n [y_i - (b_0 + b_1x_i)]^2

  • Minimizing S(b0,b1)S(b_0, b_1) involves setting partial derivatives with respect to b0b_0 and b1b_1 to zero.
  • This leads to a system of two linear equations called the normal equations.

Normal equations: nb0+(∑xi)b1=∑yi(∑xi)b0+(∑xi2)b1=∑xiyi\begin{aligned} nb_0 + (\sum x_i)b_1 &= \sum y_i \\ (\sum x_i)b_0 + (\sum x_i^2)b_1 &= \sum x_i y_i \end{aligned}

  • Solving these equations provides the least squares estimates β^0\hat{\beta}_0 and β^1\hat{\beta}_1.

20.4 Least squares estimates and formulas

  • The estimated regression line is y=β^0+β^1xy = \hat{\beta}_0 + \hat{\beta}_1x.

  • The least squares estimate for the slope β1\beta_1 is: β^1=SxySxx\hat{\beta}_1 = \frac{S_{xy}}{S_{xx}}

  • The least squares estimate for the intercept β0\beta_0 is: β^0=yˉ−β^1xˉ\hat{\beta}_0 = \bar{y} - \hat{\beta}_1\bar{x}

Key formulas for least squares estimates:

  • Slope: β^1=SxySxx\hat{\beta}_1 = \frac{S_{xy}}{S_{xx}}
  • Intercept: β^0=yˉ−β^1xˉ\hat{\beta}_0 = \bar{y} - \hat{\beta}_1\bar{x}
  • Computational formulas for SxyS_{xy} and SxxS_{xx}:
    • Sxy=∑xiyi−(∑xi)(∑yi)nS_{xy} = \sum x_i y_i - \frac{(\sum x_i)(\sum y_i)}{n}
    • Sxx=∑xi2−(∑xi)2nS_{xx} = \sum x_i^2 - \frac{(\sum x_i)^2}{n}

20.5 Example application

  • Consider data on tensile force (xx) and elongation (yy) for steel.
  • xx is in thousands of pounds, yy is in thousands of an inch.
x (thousand lbs)y (thousand inches)
114
233
340
463
576
685
  • Tasks:
    1. Graph the data to check for linearity.
    2. Find the least squares line equation.
    3. Predict elongation for a tensile force of 3.5 thousand pounds.

📝 Example: Predicting elongation for a given tensile force using the derived least squares line.

🔑 Important: The accuracy of predictions depends on the assumption of a linear relationship holding true.

🔑 Important: Least squares estimates provide the best linear fit to the data by minimizing the sum of squared errors.

21. Statistical inference and estimation (part 9)

21.1 Linear regression and estimation

This section covers estimating parameters in linear regression models. We use data to find the best-fitting line.

This involves plotting data, calculating coefficients, and predicting values.

  • Scattergram: A plot showing the relationship between two variables. It helps visualize trends 364.
  • Linear Regression Equation: The form is y=β0+β1xy = \beta_0 + \beta_1 x. Here, β0\beta_0 is the intercept and β1\beta_1 is the slope 371.

21.1.1 Estimating regression coefficients

We estimate the coefficients β0\beta_0 and β1\beta_1 using sample data. This is often done using methods like least squares.

  • Least Squares Method: This method finds the line that minimizes the sum of squared differences between observed and predicted y values.
  • Formulas for β0\beta_0 and β1\beta_1:
    • β1=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2\beta_1 = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sum (x_i - \bar{x})^2}.
    • β0=yˉ−β1xˉ\beta_0 = \bar{y} - \beta_1 \bar{x} 369.

🔑 Important: The formulas for β0\beta_0 and β1\beta_1 are derived to minimize the sum of squared errors.

21.1.2 Calculating predictions and residuals

Once coefficients are estimated, we can predict values and check the model's fit.

  • Estimated y^\hat{y}: The predicted value of yy for a given xx. It is calculated as y^=b0+b1x\hat{y} = b_0 + b_1 x 366.
  • Residuals (eie_i): The difference between the observed yiy_i and the predicted y^i\hat{y}_i. Calculated as ei=yi−y^ie_i = y_i - \hat{y}_i.

🔑 Important: The sum of residuals should be close to zero, accounting for rounding errors. ∑ei≈0\sum e_i \approx 0 370.

Example Calculation of Regression Coefficients

xY∑xi\sum x_i∑yi\sum y_i∑xi2\sum x_i^2∑yi2\sum y_i^2∑xiyi\sum x_i y_i
51015182510050
15184036225324270
25206556625724500
35251008112251049875
4532145113202517731440
5045195158405035232885

Using the formulas:

  • β1=6−1956−2=391200−30810048900−38025=8310010875≈7.64\beta_1 = \frac{6 - 195 }{6 - ^2} = \frac{391200 - 308100}{48900 - 38025} = \frac{83100}{10875} \approx 7.64 .
  • β0=1586−7.64(1956)≈26.33−7.64(32.5)≈26.33−248.3=−221.97\beta_0 = \frac{158}{6} - 7.64 \left(\frac{195}{6}\right) \approx 26.33 - 7.64(32.5) \approx 26.33 - 248.3 = -221.97

This example shows how calculations are performed, though the provided document excerpts have different numerical examples.

21.2 Coefficient of Determination (r2r^2)

The coefficient of determination quantifies how well the linear regression model explains the variation in the dependent variable.

  • Error Sum of Squares (SSE): The sum of squared residuals. It measures unexplained variation. SSE=∑(yi−y^i)2SSE = \sum (y_i - \hat{y}_i)^2 380.
  • Total Sum of Squares (SST): The sum of squared deviations of the observed yy values from their mean. It represents the total variation in yy. SST=∑(yi−yˉ)2SST = \sum (y_i - \bar{y})^2 381.

🔑 Important: SST measures total variation, while SSE measures variation not explained by the model.

21.2.1 Interpretation of r2r^2

r2r^2 is a crucial metric for model evaluation.

  • Formula for r2r^2: r2=1−SSESSTr^2 = 1 - \frac{SSE}{SST}.
  • Meaning of r2r^2: It represents the proportion of variance in the dependent variable (yy) that is predictable from the independent variable (xx).
  • Range of r2r^2: r2r^2 values are between 0 and 1 382.
    • r2=0r^2 = 0 means the model explains none of the variation.
    • r2=1r^2 = 1 means the model explains all of the variation.

🔑 Important: A higher r2r^2 value indicates a better fit of the simple linear regression model to the data.

🔑 Important: The coefficient of determination (r2r^2) quantifies the proportion of total variation in yy explained by the linear relationship with xx 383.

22. Statistical inference and estimation (part 10)

22.1 Coefficient of determination

  • Coefficient of determination (r2r^2): measures the proportion of variance in the dependent variable explained by the independent variable(s).

  • It can be expressed as the ratio of the regression sum of squares to the total sum of squares.

r2=SSRSSTr^2 = \frac{SSR}{SST}

  • Alternatively, it is calculated as one minus the ratio of the residual sum of squares to the total sum of squares.

r2=1−SSESSTr^2 = 1 - \frac{SSE}{SST}

  • Regression sum of squares (SSR): represents the variation explained by the regression model. SSR=∑(y^−yˉ)2SSR = \sum (\hat{y} - \bar{y})^2.

  • Residual sum of squares (SSE): represents the unexplained variation or error. SSE=∑(y−y^)2SSE = \sum (y - \hat{y})^2.

  • Total sum of squares (SST): represents the total variation in the dependent variable. SST=∑(y−yˉ)2SST = \sum (y - \bar{y})^2.

🔑 Important: A higher r2r^2 value indicates a better fit of the model to the data.

22.2 Least squares fit for a straight line

  • The method of least squares is used to find the best-fitting straight line through a set of data points. It minimizes the sum of the squared differences between observed and predicted values.

  • For a simple linear regression model y=b0+b1xy = b_0 + b_1x, the normal equations to solve for the coefficients b0b_0 and b1b_1 are: ∑y=nb0+b1∑x\sum y = nb_0 + b_1 \sum x ∑xy=b0∑x+b1∑x2\sum xy = b_0 \sum x + b_1 \sum x^2

  • Where nn is the number of data points.

🔑 Important: Solving these normal equations gives the unique least squares estimates for the intercept (b0b_0) and slope (b1b_1).

22.2.1 Example calculation of least squares fit

  • Consider data for the amount of additive (xx) and battery life (yy).

    Amount of Additive (xx)Life (yy)
    510
    1518
    2520
    3525
    4532
    5045
  • From this data, the following sums can be calculated:

    • ∑x=175\sum x = 175
    • ∑y=150\sum y = 150
    • ∑x2=6625\sum x^2 = 6625
    • ∑xy=4498\sum xy = 4498
    • n=6n = 6
  • The least squares estimates for b0b_0 and b1b_1 are calculated as follows:

b1=n(∑xy)−(∑x)(∑y)n(∑x2)−(∑x)2=6−6−2=26988−2625039750−30625=7389125≈0.081b_1 = \frac{n(\sum xy) - (\sum x)(\sum y)}{n(\sum x^2) - (\sum x)^2} = \frac{6 - }{6 - ^2} = \frac{26988 - 26250}{39750 - 30625} = \frac{738}{9125} \approx 0.081 .

b0=∑y−b1∑xn=150−(0.081)6=150−14.1756=135.8256≈22.64b_0 = \frac{\sum y - b_1 \sum x}{n} = \frac{150 - (0.081) }{6} = \frac{150 - 14.175}{6} = \frac{135.825}{6} \approx 22.64 175.

  • The least squares fit equation is: y^=22.64+0.081x\hat{y} = 22.64 + 0.081x.

🔑 Important: The least squares method provides the line that minimizes the sum of squared errors, offering the best linear approximation of the relationship between variables.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also