Business Statistics for Entrepreneurs

IIM Bangalore BBA in Digital Business and Entrepreneurship · Term 1 · 8 modules, 475 topics.

Association between Random Variables and Simple Linear Regression

Covariance

Covariance quantifies the direction of a linear relationship between two quantitative variables. It indicates whether an increase in one variable tends to be associated with an increase (positive) or decrease (negative) in the other.

For a sample with nn observation pairs (x1,y1),(x2,y2),,(xn,yn)(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n), the sample covariance sxys_{xy} is:

sxy=i=1n(xixˉ)(yiyˉ)n1s_{xy} = \frac{\sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y})}{n - 1}

where xˉ\bar{x} and yˉ\bar{y} are sample means. The division by n1n-1 (rather than nn) follows the same degrees‑of‑freedom reasoning used for sample variance.

Intuition via quadrants

Plot the data with vertical/horizontal lines at xˉ\bar{x} and yˉ\bar{y}:

  • Quadrant I (xi>xˉ,  yi>yˉx_i > \bar{x},\; y_i > \bar{y}) → product (xixˉ)(yiyˉ)>0(x_i-\bar{x})(y_i-\bar{y}) > 0
  • Quadrant III (xi<xˉ,  yi<yˉx_i < \bar{x},\; y_i < \bar{y}) → product >0> 0
  • Quadrant II (xi<xˉ,  yi>yˉx_i < \bar{x},\; y_i > \bar{y}) → product <0< 0
  • Quadrant IV (xi>xˉ,  yi<yˉx_i > \bar{x},\; y_i < \bar{y}) → product <0< 0
flowchart LR
    A[Point location] --> B{Product sign}
    B -->|Quad I or III| C[Positive contribution]
    B -->|Quad II or IV| D[Negative contribution]

If most influential points lie in Quadrants I and III → sxy>0s_{xy} > 0 (positive linear association).
If they lie in Quadrants II and IV → sxy<0s_{xy} < 0 (negative linear association).
If points are evenly spread → sxy0s_{xy} \approx 0 (no linear association).

Relation to variance

When x=yx = y, covariance reduces to variance of xx:

sxx=(xixˉ)2n1=sx2s_{xx} = \frac{\sum (x_i - \bar{x})^2}{n - 1} = s_x^2

Thus covariance generalises variance to pairs of variables.

Unit dependence – a major flaw

Covariance changes with the units of measurement. For example, measuring income in rupees instead of lakhs scales (xixˉ)(x_i - \bar{x}) by 10510^5, inflating sxys_{xy} even though the underlying relationship is unchanged. This makes covariance unsuitable for comparing the strength of association across different datasets.

Example: Hanumantha Pai’s credit card data

Variable pairsxys_{xy}Interpretation
Monthly spend vs. annual income16,109Positive association
Monthly spend vs. household size1,610Positive association (smaller magnitude)

The numerical values are not comparable because units differ (lakhs vs. number of people).

Exam tip: Never compare covariance values across different pairs to judge which relationship is “stronger”. Use the correlation coefficient instead.

Key takeaways – Covariance

  • Measures the direction (positive/negative) but not the strength of linear association.
  • Formula: sxy=(xixˉ)(yiyˉ)n1s_{xy} = \frac{\sum (x_i-\bar{x})(y_i-\bar{y})}{n-1}.
  • Positive → x and y tend to move together; negative → they move opposite.
  • Unit‑dependent – not useful for comparing strength across different variable pairs.

Correlation

The Pearson product‑moment correlation coefficient (sample correlation coefficient) overcomes covariance’s unit dependence by standardising:

rxy=sxysxsyr_{xy} = \frac{s_{xy}}{s_x \cdot s_y}

where sxs_x and sys_y are the sample standard deviations of xx and yy.

Properties

  • 1rxy1-1 \leq r_{xy} \leq 1
  • rxy=+1r_{xy} = +1 iff all points lie on a positively‑sloped straight line (perfect positive linear).
  • rxy=1r_{xy} = -1 iff all points lie on a negatively‑sloped straight line (perfect negative linear).
  • rxy=0r_{xy} = 0 indicates no linear relationship (non‑linear relationships may still exist).
  • Closer to ±1\pm 1 → stronger linear association.

Worked example – Hanumantha Pai

Income vs. Monthly spend
sxy=16,109s_{xy} = 16{,}109, sx=13.74s_x = 13.74 lakhs, sy=1,454s_y = 1{,}454 rupees.

r=16,10913.74×1,454=0.81r = \frac{16{,}109}{13.74 \times 1{,}454} = 0.81

→ Strong positive linear association.

Household size vs. Monthly spend
sxy=1,610s_{xy} = 1{,}610, sx=1.76s_x = 1.76, sy=1,454s_y = 1{,}454.

r=1,6101.76×1,454=0.63r = \frac{1{,}610}{1.76 \times 1{,}454} = 0.63

→ Moderate positive linear association (weaker than income).

CorrelationStrengthExample value
±1\pm 1Perfect
>0.8> 0.8Strong0.81 (income)
0.50.50.80.8Moderate0.63 (household)
<0.5< 0.5Weak
00None (linear)

Correlation is NOT causation

A high correlation does not prove that a change in one variable causes a change in the other. In the credit‑card example, higher income does not force higher spending – other factors (preferences, debt) could be at play.

Exam tip: The mantra “correlation does not imply causation” is a frequently tested concept. Always remember that a third (lurking) variable or reverse causality could explain the association.

Limitation – linear only

The Pearson correlation only measures linear relationships. A near‑zero rr can occur even when a strong non‑linear pattern exists (e.g., U‑shaped relationship between utility spending and outdoor temperature). Always inspect a scatter diagram alongside the correlation coefficient.

When variables are not quantitative

If one or both variables are nominal or ordinal, other measures (e.g., Spearman’s rank correlation) are used – these are discussed later.

Key takeaways – Correlation

  • rxy=sxysxsyr_{xy} = \frac{s_{xy}}{s_x s_y}, dimensionless and scale‑invariant.
  • Lies between 1-1 (perfect negative) and +1+1 (perfect positive).
  • 00 means no linear relationship – non‑linear patterns may still exist.
  • Correlation is not causation.
  • Always check a scatter plot to avoid being misled by a near‑zero rr from a non‑linear relationship.

Covariance and Correlation

Covariance measures the direction of the linear relationship between two variables: positive → both move together; negative → one goes up as the other goes down. Correlation standardises covariance onto a [1,1][-1, 1] scale, giving a unitless measure of linear association strength.

Computing in Excel

  • Sample covariance (divides by n1n-1): =COVARIANCE.S(array1, array2)
  • Sample correlation (Pearson’s rr): =CORREL(array1, array2)

Applied to Hanumantha’s credit card data:

VariablesCovarianceCorrelation
Monthly spend & household income16,1090.806
Monthly spend & household size1,6100.629

The Pearson correlation measures only linear association

r=sxysxsy,sxy=1n1i=1n(xixˉ)(yiyˉ)r = \frac{s_{xy}}{s_x s_y}, \qquad s_{xy} = \frac{1}{n-1}\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})

Worked example (nonlinear relationship):
x={3,2,1,1,2,3}x = \{3, 2, 1, -1, -2, -3\}, y=1/x2={19,14,1,1,14,19}y = 1/x^2 = \{\frac{1}{9}, \frac{1}{4}, 1, 1, \frac{1}{4}, \frac{1}{9}\}.
Excel gives sxy=0s_{xy} = 0, r=0r = 0. But y=1/x2y = 1/x^2 is a perfect nonlinear relationship.

Exam tip: r=0r = 0 does not mean “no association” – it means no linear association. Always inspect a scatter plot.

Spurious vs. Explainable Correlation

  • Explainable correlation: logical reason connects the variables.
  • Spurious correlation: apparent relationship due to a hidden (latent) variable or pure coincidence.
ExampleObserved correlationHidden cause
Ice cream sales ↔ crime ratePositiveTemperature (summer → more ice cream + more vacant homes)
Number of doctors ↔ number of deaths in villagesPositivePoor public health → more doctors needed + more deaths
Divorce rate in Maine ↔ margarine consumptionr0.99r \approx 0.99 (1999–2009)No known hidden variable – purely spurious
Skirt length ↔ economic activity (Scotland theory)Skirts shorter in boom, longer in bustProposed reason: affordability of stockings; widely considered spurious

Key takeaways

  • Covariance and Pearson correlation quantify linear association only.
  • r=0r = 0 does not imply independence; check for nonlinear patterns.
  • Spurious correlation can arise from hidden variables or random chance – never assume causation.
  • Sample correlation is a point estimate; a hypothesis test (using a tt-distribution) can assess if the population correlation is nonzero.

Simple Linear Regression – I

Simple linear regression (SLR) predicts a continuous dependent (response) variable yy using one independent (predictor) variable xx. It assumes the relationship can be approximated by a straight line.

Origin and terminology

  • Francis Galton (1886) studied heights of 905 children from 205 families. He multiplied female heights by 1.08 to make them male-equivalent. He observed regression toward the mean: tall parents had slightly shorter children, short parents had slightly taller children. He coined the term regression.
  • yy = dependent / response / outcome variable
  • xx = independent / predictor / explanatory variable / feature

The model

yi=β0+β1xi+εi,i=1,2,,ny_i = \beta_0 + \beta_1 x_i + \varepsilon_i, \quad i = 1,2,\dots,n

  • β0\beta_0 (intercept), β1\beta_1 (slope) – regression coefficients (parameters)
  • β0+β1xi\beta_0 + \beta_1 x_i = predicted value (conditional expected value of yy given xix_i)
  • εi\varepsilon_i = random error (residual/unexplained variation)

What “linear” really means

Linearity is defined with respect to the parameters β0,β1\beta_0, \beta_1, not the variable xx.

  • yi=β0+β1xi2+εiy_i = \beta_0 + \beta_1 x_i^2 + \varepsilon_ilinear regression (parameters are linear)
  • yi=β0+β1log(xi)+εiy_i = \beta_0 + \beta_1 \log(x_i) + \varepsilon_ilinear regression
  • yi=β0+eβ1xi+εiy_i = \beta_0 + e^{\beta_1} x_i + \varepsilon_inonlinear regression (parameter β1\beta_1 appears in exponent)

Exam tip: A model is linear if it can be written as a linear combination of the parameters. Transformations of xx are allowed; transformations of β\beta are not (unless the model can be re‑linearised).

Examples of SLR applications

  • Monthly credit card spend vs. household income or household size
  • Government policy impact on wages
  • Restaurant waiting time vs. popularity rating
  • Hospital treatment cost vs. patient weight
  • Website visits vs. e‑commerce sales revenue
  • Unemployment rate vs. bank non‑performing assets

Nine steps of building a regression model

flowchart TD
  A[1. Collect & extract data] --> B[2. Preprocess data]
  B --> C[3. Split into training (≈75%) & validation]
  C --> D[4. Compute descriptive statistics + visualise]
  D --> E[5. Define functional form]
  E --> F[6. Estimate parameters via OLS]
  F --> G[7. Perform model diagnostics]
  G --> H[8. Validate on validation set]
  H --> I[9. Deploy if performance is acceptable]
  • Data preprocessing: handle outliers, missing values; derive new features (e.g., Galton’s 1.08 factor).
  • Training/validation split: random sampling; typical 75% training, 25% validation.
  • Ordinary Least Squares (OLS): finds β0,β1\beta_0, \beta_1 that minimise (yi(β0+β1xi))2\sum (y_i - (\beta_0 + \beta_1 x_i))^2. OLS gives the best linear unbiased estimates (BLUE).
  • Diagnostics: check assumptions (linearity, normality of errors, homoscedasticity, independence).
  • Overfitting: model performs well on training data but poorly on validation data. An ideal model has low bias and low variance.

Key takeaways

  • SLR models a continuous yy using one xx; parameters are linear in β0,β1\beta_0, \beta_1.
  • “Linear” refers to coefficients, not the shape of xx.
  • OLS minimises sum of squared residuals.
  • Model building is iterative: collect → preprocess → split → describe → specify → estimate → diagnose → validate → deploy.
  • Spurious correlation does not imply regression causation; always use domain logic and diagnostics.

The Regression Equation and Its Interpretation

The regression equation for a sample is written as

yi=β0+β1xi+εiy_i = \beta_0 + \beta_1 x_i + \varepsilon_i

where

  • yiy_i: observed value of the dependent variable for the iith observation,
  • xix_i: observed value of the independent variable for the iith observation,
  • εi\varepsilon_i: random error (also called residual or unexplained variation),
  • β0,β1\beta_0, \beta_1: regression parameters (coefficients).

What the equation really means.
The population can be viewed as a collection of subpopulations — one for each distinct xx value. For example, among Hanumanthappa’s bank customers, all customers with an annual income of ₹20 lakh form one subpopulation, those with ₹30 lakh another, and so on. Each subpopulation has its own distribution of monthly spend yy and its own expected value E(y)E(y). The regression equation describes how this expected value depends on xx:

E(yx)=β0+β1xE(y|x) = \beta_0 + \beta_1 x

The error term disappears when taking the expectation because E(εi)=0E(\varepsilon_i)=0.

Estimation Using Sample Data

Population parameters β0\beta_0 and β1\beta_1 are unknown. They are estimated from a sample (the training data) by sample statistics b0b_0 and b1b_1. Substituting these estimates gives the estimated regression equation:

y^=b0+b1x\hat{y} = b_0 + b_1 x

where y^\hat{y} is the point estimator of:

  • the mean value of yy for a given xx (e.g., mean monthly spend for all customers with ₹20 lakh income), and
  • the predicted value of yy for an individual observation at that xx (e.g., predicted spend for one particular customer with ₹20 lakh income).

Exam tip: The same formula y^=b0+b1x\hat{y}=b_0+b_1x serves both for estimating a conditional mean and for predicting an individual outcome. The difference matters when constructing confidence/prediction intervals (later).

Ordinary Least Squares (OLS) Estimation

The ordinary least squares (OLS) method finds b0b_0 and b1b_1 that minimize the sum of squared deviations between observed yiy_i and predicted y^i\hat{y}_i:

Minimize i=1n(yiy^i)2\text{Minimize } \sum_{i=1}^n (y_i - \hat{y}_i)^2

Using calculus, the solution is:

b1=i=1n(xixˉ)(yiyˉ)i=1n(xixˉ)2b_1 = \frac{\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})}{\sum_{i=1}^n (x_i - \bar{x})^2}

b0=yˉb1xˉb_0 = \bar{y} - b_1 \bar{x}

  • xˉ\bar{x}, yˉ\bar{y} are sample means of xx and yy.
  • The slope b1b_1 estimates the expected change in yy for a one-unit increase in xx.
  • The intercept b0b_0 estimates E(y)E(y) when x=0x=0 (meaningful only if x=0x=0 is within the data range).

Caution: Predictions using xx values outside the range of the training data are unreliable — the linear relationship may not hold beyond the observed data.

Worked Example: Hanumanthappa’s Bank Customers

Data: monthly spend (yy) vs. annual income in lakhs (xx) for 55 customers.

StatisticValue
xˉ\bar{x}32.89 lakhs
yˉ\bar{y}₹3,852
b1b_185.27
b0b_01,047.37

Estimated regression equation:

y^=1, ⁣047.37+85.27x\hat{y} = 1,\!047.37 + 85.27\,x

Interpretation of slope: An increase of ₹1 lakh in annual income is associated with an increase of ₹85.27 in monthly spend.

Prediction: For a customer with annual income ₹35 lakhs:

y^=1, ⁣047.37+85.27×35=4, ⁣032\hat{y} = 1,\!047.37 + 85.27 \times 35 = 4,\!032

Predicted monthly spend: ₹4,032.

Computing OLS in Excel

  • Create a scatter plot (y vs. x).
  • Right-click a data point → Add Trendline → Linear.
  • Check “Display Equation on chart” and “Display R-squared value on chart”.

Excel outputs the same b0b_0, b1b_1, and also R2R^2.

Coefficient of Determination (R2R^2)

R2R^2 (or coefficient of determination) measures the goodness of fit of the estimated regression equation. It is the percentage of the total variation in yy that is explained by the linear relationship with xx:

R2=variation explained by modeltotal variation in yR^2 = \frac{\text{variation explained by model}}{\text{total variation in } y}

  • Ranges from 0 to 1 (or 0% to 100%).
  • Higher R2R^2 indicates a better fit.
  • In simple linear regression, R2R^2 equals the square of the Pearson correlation rxyr_{xy}.

Exam tip: R2R^2 tells you how much of y’s variability the model explains, not whether the model is correct. Always inspect residual plots before trusting R2R^2.

Key takeaways

  • Regression models E(yx)=β0+β1xE(y|x) = \beta_0 + \beta_1 x; estimated by y^=b0+b1x\hat{y} = b_0 + b_1 x.
  • OLS minimizes (yiy^i)2\sum (y_i - \hat{y}_i)^2; formulas: b1=(xixˉ)(yiyˉ)(xixˉ)2b_1 = \frac{\sum (x_i-\bar{x})(y_i-\bar{y})}{\sum (x_i-\bar{x})^2}, b0=yˉb1xˉb_0 = \bar{y} - b_1\bar{x}.
  • Slope interpretation: b1b_1 = estimated change in yy per one‑unit increase in xx.
  • Do not extrapolate beyond the range of xx in the sample.
  • R2R^2 = proportion of variation in yy explained by the model; closer to 1 → better linear fit.

Residuals and Sums of Squares

For the (i)-th observation, the residual is the difference between the observed value (y_i) and the predicted value (\hat{y}_i):

[ \text{residual}_i = y_i - \hat{y}_i ]

Residuals capture the error in using the regression line to predict the sample. The least‑squares method minimises the sum of squared residuals, called the sum of squares due to error (SSE):

[ \text{SSE} = \sum_{i=1}^{n} (y_i - \hat{y}_i)^2 ]

SSE measures the unexplained variation in (y) after fitting the model.

If no predictor (x) were available, the best guess for any (y_i) is the sample mean (\bar{y}). The total sum of squares (SST) measures the total variation in (y):

[ \text{SST} = \sum_{i=1}^{n} (y_i - \bar{y})^2 ]

The sum of squares due to regression (SSR) measures how much the regression predictions (\hat{y}_i) deviate from (\bar{y}):

[ \text{SSR} = \sum_{i=1}^{n} (\hat{y}_i - \bar{y})^2 ]

These three quantities are linked by a fundamental identity:

[ \text{SST} = \text{SSR} + \text{SSE} ]

Total variation = explained variation + unexplained variation.

Worked example (Hanumantha’s data, (n=55)): [ \text{SSE} = 40,017,408,\quad \text{SSR} = 74,180,516,\quad \text{SST} = 114,197,923 ] Check: (74,180,516 + 40,017,408 = 114,197,923).

Coefficient of Determination ( (R^2) )

The coefficient of determination (R^2) is the proportion of total variation explained by the regression:

[ R^2 = \frac{\text{SSR}}{\text{SST}} ]

  • (R^2 = 1) when (\text{SSE}=0) (perfect fit).
  • (R^2 = 0) when (\text{SSR}=0) (model explains nothing).
  • (0 \le R^2 \le 1).

Interpreted as a percentage, (R^2) tells us the percentage of variability in (y) accounted for by the linear relationship with (x). For Hanumantha’s data:

[ R^2 = \frac{74,180,516}{114,197,923} \approx 0.650 \quad\Rightarrow\quad 65% ]

Thus, 65% of the variation in monthly spend is explained by annual income.

Exam tip: A high (R^2) indicates good fit in the sample, but does not guarantee the model is appropriate – assumptions must still be checked.

Key takeaways (decomposition & (R^2))

  • (\text{SST} = \text{SSR} + \text{SSE}) – total variation splits into explained and unexplained parts.
  • (R^2 = \text{SSR}/\text{SST}) – fraction of variation explained by the regression.
  • Higher (R^2) implies a better linear fit, but (R^2) alone does not validate the model.

Correlation Coefficient vs. Coefficient of Determination

The sample correlation coefficient (r) measures the strength and direction of a linear relationship between (x) and (y) ((-1 \le r \le 1)). It relates to (R^2) in simple linear regression:

[ r = \sqrt{R^2} \times \text{sign}(b_1) ]

where (b_1) is the estimated slope from the regression.

  • If (b_1 > 0), (r = +\sqrt{R^2}).
  • If (b_1 < 0), (r = -\sqrt{R^2}).

In Hanumantha’s example, (b_1 = 85.27 > 0) and (R^2 = 0.65), so:

[ r = \sqrt{0.65} \approx 0.806 ]

This indicates a strong positive linear association.

Exam tip: Unlike (r), (R^2) can be used for nonlinear models and multiple regression – it is a more general measure of fit.

Assumptions of the Error Term

For valid inference in simple linear regression, four key assumptions are made about the error term (\varepsilon):

  1. Zero mean: (E(\varepsilon) = 0) for all (x). Hence (E(y) = \beta_0 + \beta_1 x).
  2. Constant variance: (\text{Var}(\varepsilon) = \sigma^2) for all (x) (homoscedasticity).
  3. Independence: The errors are independent; no autocorrelation.
  4. Normality: (\varepsilon) is normally distributed for every (x).

Together, these imply that for any given (x), (y) is normally distributed with mean (\beta_0 + \beta_1 x) and constant variance (\sigma^2).

Test for Significance of the Linear Relationship

We test whether the slope (\beta_1) is different from zero (i.e., whether a linear relationship exists).

[ H_0: \beta_1 = 0,\quad H_a: \beta_1 \neq 0 ]

Estimating (\sigma^2)

The mean square error (MSE) provides an unbiased estimate of (\sigma^2):

[ \text{MSE} = s^2 = \frac{\text{SSE}}{n-2} ]

With (n-2) degrees of freedom (two parameters estimated: (\beta_0, \beta_1)). The standard error of the estimate is (s = \sqrt{\text{MSE}}).

Hanumantha’s data: (n=55), (\text{SSE} = 40,017,408), so

[ \text{MSE} = \frac{40,017,408}{53} \approx 755,045,\quad s = \sqrt{755,045} \approx 868.9 ]

t‑Test

The standard error of the slope (b_1) is:

[ \text{se}(b_1) = \frac{s}{\sqrt{\sum (x_i - \bar{x})^2}} ]

For Hanumantha’s data, (\sum (x_i - \bar{x})^2 = 10,201), so

[ \text{se}(b_1) = \frac{868.9}{\sqrt{10,201}} \approx 8.603 ]

The test statistic follows a t distribution with (n-2) degrees of freedom:

[ t = \frac{b_1 - \beta_1}{\text{se}(b_1)} = \frac{85.27 - 0}{8.603} \approx 9.91 ]

The corresponding p‑value (two‑tailed) is extremely small ((\approx 1.1 \times 10^{-13})), providing strong evidence to reject (H_0). We conclude that a significant linear relationship exists.

Exam tip: For simple linear regression, the t‑test and an F‑test (using SSR/MSR vs MSE) are equivalent. In multiple regression they diverge.

Key takeaways (assumptions & significance test)

  • Error term assumptions: zero mean, constant variance, independence, normality.
  • (\text{MSE} = \text{SSE}/(n-2)) estimates (\sigma^2); (s = \sqrt{\text{MSE}}) is the standard error of the estimate.
  • Test (H_0: \beta_1=0) using (t = b_1/\text{se}(b_1)) with (n-2) df.
  • A very small p‑value (e.g., (<0.05)) indicates a statistically significant linear relationship.

SLR - Summary Statistics

The Excel regression output for Hanumantha's data provides a compact summary of all key statistics. The R square value is 0.65, meaning 65% of the variation in monthly spend is explained by annual income. The correlation between the two variables is the square root of R square: r=0.65=0.806r = \sqrt{0.65} = 0.806, indicating a strong positive linear relationship.

The standard error s=868.9s = 868.9 is the estimate of σ\sigma (the standard deviation of the error term ϵ\epsilon). Its square s2s^2 estimates σ2\sigma^2, the variance of ϵ\epsilon.

ANOVA Table

SourceSSdfMSFp-value
Regression (SSR)74,180,516174,180,51698.250\approx 0
Residual (SSE)40,017,40853755,045
Total114,197,92454
  • Sum of squares regression SSR = 74,180,516.
  • Sum of squares error SSE = 40,017,408.
  • Mean square regression MSR = SSR / 1 = 74,180,516.
  • Mean square error MSE = SSE / 53 = 755,045.
  • F statistic = MSR / MSE = 98.25.
  • The p-value (Significance F) is near zero, so we reject H0:β1=0H_0: \beta_1 = 0 and conclude the linear relationship is statistically significant.

Coefficients and Estimated Regression Equation

CoefficientEstimateStandard Errort Statisticp-value
Intercept (b0b_0)10,470.37
Annual Income (b1b_1)85.278.69.910\approx 0

Estimated regression equation:
y^=10470.37+85.27x\hat{y} = 10\,470.37 + 85.27\,x

  • b1b_1 standard error: sb1=s(xixˉ)2=868.910201=8.6038.6s_{b_1} = \frac{s}{\sqrt{\sum (x_i - \bar{x})^2}} = \frac{868.9}{\sqrt{10\,201}} = 8.603 \approx 8.6.
  • t test for β1=0\beta_1 = 0: t=b1sb1=85.278.6=9.91t = \frac{b_1}{s_{b_1}} = \frac{85.27}{8.6} = 9.91, with p-value 0\approx 0 → reject H0H_0.

Exam tip: Excel’s regression tool outputs all these values at once. The key interpretation steps: check R square, then overall F test, then individual coefficient t tests. The F and t tests yield the same conclusion for simple linear regression (since t2=Ft^2 = F).

Key takeaways

  • R square = 0.65, correlation = 0.806.
  • Standard error s=868.9s = 868.9 estimates σ\sigma.
  • F test (F=98.25F=98.25, p ≈ 0) confirms a significant linear relationship.
  • Estimated equation: y^=10470.37+85.27x\hat{y} = 10\,470.37 + 85.27\,x.
  • Slope’s t test (t=9.91t=9.91, p ≈ 0) matches F test result.

SLR - Residual Analysis

Residual for observation ii: ei=yiy^ie_i = y_i - \hat{y}_i (observed minus predicted). Residuals are the best empirical proxy for the error term ϵ\epsilon. Three model assumptions about ϵ\epsilon must be checked:

  1. Expected value E(ϵ)=0E(\epsilon) = 0 (automatically satisfied by least squares).
  2. Constant variancehomoscedasticityVar(ϵ)=σ2\text{Var}(\epsilon) = \sigma^2 for all xx.
  3. Independence of errors.
  4. NormalityϵN(0,σ2)\epsilon \sim N(0,\sigma^2).

If assumptions fail, hypothesis tests (t and F) may be invalid.

Residual Plots

Three diagnostic plots are commonly examined:

  1. Residual vs. independent variable xx (provided by Excel).
  2. Residual vs. predicted values y^\hat{y} (can be created from output).
  3. Standardized residual plot (also provided by Excel).

Standardized residual: ei=eiseie_i^* = \frac{e_i}{s_{e_i}} (mean = 0, standard deviation ≈ 1). For normally distributed errors, about 95% of standardized residuals lie between −2 and +2.

Interpreting Residual Plot Patterns

flowchart TD
    A[Residual plot shape] --> B{Pattern?}
    B -->|Horizontal band| C[Assumptions hold: constant variance, linear model adequate]
    B -->|Funnel (spread increases with x)| D[Violation: heteroscedasticity]
    B -->|U-shaped (curvilinear)| E[Model inadequate: consider polynomial or multiple regression]
  • Panel A (horizontal band): no obvious violation → model assumptions appear satisfied.
  • Panel B (funnel): variance increases with xx → homoscedasticity assumption violated.
  • Panel C (U-shape): systematic curvature → linear model not appropriate.

For Hanumantha’s data, the residual plot shows a horizontal band pattern (like Panel A), supporting the assumptions. The same pattern appears in the residual vs. y^\hat{y} plot (for simple linear regression, both plots give identical information; for multiple regression, the y^\hat{y} plot is preferred).

Checking Normality with Standardized Residuals

Excel provides standardized residuals. In Hanumantha’s dataset, nearly all standardized residuals lie within ±2, consistent with a standard normal distribution. Thus the normality assumption is not violated.

Exam tip: Residual analysis is qualitative. Look for clear deviations (funnel, U-shape, many points outside ±2). A few points near the boundaries do not automatically invalidate the model.

Key takeaways

  • Residuals estimate ϵ\epsilon and are used to validate model assumptions.
  • Three key plots: residuals vs. xx, residuals vs. y^\hat{y}, standardized residuals.
  • Desired pattern: horizontal band (constant variance, linearity).
  • About 95% of standardized residuals should fall in [−2, +2] for normality.
  • Hanumantha’s data satisfies all assumptions (band pattern, no extreme standardized residuals).

Outliers

An outlier is a data point that does not follow the trend of the rest of the data. In simple linear regression, outliers can be detected via:

  • Scatter plot of yy vs. xx.
  • Standardized residuals — any observation with ei>2|e_i^*| > 2 (roughly) is a potential outlier.

Handling Outliers

SituationAction
Erroneous data (entry/recording error)Correct the value and re-run regression; R square usually improves.
Violation of model assumptionsConsider a different model (e.g., curvilinear, transformation).
Genuine unusual valueRetain the observation — it may be a chance occurrence.

Influential Observations

An influential observation dramatically changes the estimated regression equation (slope, intercept, or both) when removed. Detection methods:

  • Scatter diagram — look for points that are:
    • An outlier in yy (far from the trend line),
    • An extreme xx value (far from xˉ\bar{x}),
    • A combination of both.

Handling Influential Observations

  1. Check for errors in data collection/recording — correct if possible.
  2. If valid, treat the observation as providing additional insight. Consider collecting more data at intermediate xx values to better understand the relationship.

Exam tip: Outliers and influential points are not automatically bad. Always investigate the reason before discarding. In small datasets, a single influential point can dominate the regression — report it transparently.

Key takeaways

  • Outliers: |standardized residual>2| > 2; may be erroneous, model violation, or genuine.
  • Influential observation: extreme xx, outlying yy, or both; can shift the regression line substantially.
  • First step for both: check data accuracy.
  • Valid influential observations may motivate collecting additional data at intermediate xx values.

Test of Significance and Residual Analysis

A fitted regression line is not enough — we must ask whether the observed linear relationship is statistically significant or merely a fluke of sampling. Two hypothesis tests (t-test and F-test) answer this question. Both rely on assumptions about the error term ϵ\epsilon, which are checked through residual analysis.

The Regression Model and Estimation (Review)

The simple linear regression model is
y=β0+β1x+ϵy = \beta_0 + \beta_1 x + \epsilon

Using ordinary least squares (OLS), we obtain estimates b0b_0 and b1b_1, giving the estimated regression equation:

y^=b0+b1x\hat{y} = b_0 + b_1 x

OLS minimises the sum of squares error (SSE):
SSE=(yiy^i)2\text{SSE} = \sum (y_i - \hat{y}_i)^2

Variation in yy is decomposed as

SST=SSR+SSE\text{SST} = \text{SSR} + \text{SSE}

where

  • SST=(yiyˉ)2\text{SST} = \sum (y_i - \bar{y})^2 (total sum of squares)
  • SSR=(y^iyˉ)2\text{SSR} = \sum (\hat{y}_i - \bar{y})^2 (regression sum of squares)

The coefficient of determination R2R^2 measures how well the model explains the data:

R2=SSRSST(0R21)R^2 = \frac{\text{SSR}}{\text{SST}} \quad (0 \le R^2 \le 1)

The correlation between yy and xx is R2\sqrt{R^2} with the sign of b1b_1.

Assumptions for Hypothesis Testing

The error term ϵ\epsilon is assumed to be:

  • Normally distributed (for exact p‑values)
  • Mean zero, E(ϵ)=0E(\epsilon)=0
  • Constant variance σ2\sigma^2 (homoscedasticity)
  • Independent across observations

These assumptions are critical for the validity of the tests. The variance σ2\sigma^2 is estimated by the mean square error (MSE):

s2=MSE=SSEn2s^2 = \text{MSE} = \frac{\text{SSE}}{n-2}

The standard error of b1b_1 is MSE/(xixˉ)2\sqrt{\text{MSE} / \sum (x_i - \bar{x})^2}.

t‑Test for β1\beta_1

  • Null hypothesis H0H_0: β1=0\beta_1 = 0 (no linear relationship)
  • Alternative HaH_a: β10\beta_1 \neq 0

Test statistic:

t=b1se(b1)t = \frac{b_1}{\text{se}(b_1)}

Under H0H_0, tt follows a tt-distribution with n2n-2 degrees of freedom. The p-value is computed; if small (e.g., <0.05< 0.05), reject H0H_0 and conclude the linear relationship is statistically significant.

F‑Test for Overall Significance

For simple linear regression, the F‑test tests the same null hypothesis (β1=0\beta_1=0).

MSR=SSR1,MSE=SSEn2\text{MSR} = \frac{\text{SSR}}{1} \quad,\quad \text{MSE} = \frac{\text{SSE}}{n-2}

Test statistic:

F=MSRMSEF = \frac{\text{MSR}}{\text{MSE}}

If H0H_0 is true, FF is approximately 1. If β10\beta_1\neq 0, F>1F > 1. The FF-statistic has 1 and n2n-2 degrees of freedom; a small p‑value leads to rejecting H0H_0.

Exam tip: In simple linear regression, the t‑test and F‑test are equivalent — they give the same p‑value. In multiple linear regression, the F‑test tests the overall model while t‑tests test individual coefficients.

Residual Analysis

Residuals ei=yiy^ie_i = y_i - \hat{y}_i are used to check the assumptions on ϵ\epsilon.

  • Standardised residuals =ei/s1hii= e_i / s \cdot \sqrt{1 - h_{ii}} (or simpler ei/se_i / s). Values outside ±2\pm 2 suggest possible outliers.
  • Plot residuals vs. xx — should be randomly scattered around zero with constant spread (no funnel shape, no curvilinear pattern).
  • Plot residuals vs. y^\hat{y} (or vs. yy) — same expectation. A clear trend indicates that the model is missing relevant variables or that a linear fit is inadequate.

Key takeaways

  • Both t‑test and F‑test test H0 ⁣:β1=0H_0\!:\beta_1=0; reject → linear relationship is significant.
  • MSE\text{MSE} estimates error variance σ2\sigma^2; s=MSEs = \sqrt{\text{MSE}} is the standard error of the estimate.
  • Residual plots must be examined for violations of constant variance, independence, and linearity.
  • Standardised residuals beyond ±2 may indicate outliers.

Application: Monthly Spend vs. Household Size

Using the same dataset (Hanumantha’s), we now model monthly spend (yy) as a function of household size (xx).

Estimated Regression Equation

From Excel’s regression output:

y^=2083.7+520.1×x\hat{y} = 2083.7 + 520.1 \times x

Model Fit

MeasureValue
R2R^20.396
Correlation rxyr_{xy}0.396=0.63\sqrt{0.396} = 0.63
Standard error ss1140.71

Only 39.6% of the variation in monthly spend is explained by household size — much weaker than the model using annual income (R2=0.65R^2=0.65).

ANOVA and F‑Test

SourceSSdfMSFFp‑value
Regression (SSR)45,233,346145,233,34634.7≈ 0
Error (SSE)68,964,576511,301,218
Total (SST)114,197,92252

F=34.7F = 34.7 with a very small p‑value → reject H0H_0linear relationship between monthly spend and household size is statistically significant.

Coefficients and t‑Test

CoefficientValueStd. Errorttp‑value
Intercept b0b_02083.7
Household size b1b_1520.188.25.89≈ 0

The t‑test confirms significance (same conclusion as F‑test).

Residual Diagnostics

  • Standardised residuals: three values exceed +2 in absolute value → potential outliers.
  • Residuals vs. xx: no funnel or curvilinear shape; band is acceptable.
  • Residuals vs. yy: shows a slight trend (not a perfect random band). This suggests that other factors (e.g., income) also influence monthly spend — a multiple regression model may improve fit.

Exam tip: Always check residual plots, not just R2R^2 and p‑values. A trend in residuals vs. fitted values is a red flag that important predictors are missing.

Key takeaways

  • R2=0.396R^2 = 0.396 means household size alone explains only 39.6% of spend variation.
  • Despite low R2R^2, the linear relationship is statistically significant (p ≈ 0 for both t and F).
  • Three observations are flagged as possible outliers (standardised residual > 2).
  • Residual pattern suggests the model is incomplete; include other variables like income in multiple regression.

Simple Linear Regression — Applications: Examples II

Two worked examples demonstrate the full SLR workflow: check scatter plot, fit model, interpret , evaluate significance via F-test and t-test, examine residuals for violations and missing predictors.


Example 1: Buzzer Rogers Customer Satisfaction

Context — 36 survey responses. Question: Is price a significant determinant of satisfaction score?

  • Dependent variable yy = satisfaction score (0–100)
  • Independent variable xx = price paid (₹ 1000s)

Step 1 — Scatter plot

Price on x‑axis, score on y‑axis. A linear trend is visible, though with spread.

Step 2 — Regression equation & R²

From the trend line (and later from the tool pack):

y^=48.44+0.132x\hat{y} = 48.44 + 0.132\,x
  • R² = 0.36 — only 36 % of score variation is explained by price. The plot showed a fair trend, so the low R² hints that other factors (brand, RAM, etc.) matter.
  • Correlation r=0.36=0.59r = \sqrt{0.36} = 0.59 (positive, moderate).

Step 3 — ANOVA and overall significance

SourceSSdfMSFFpp
Regression (SSR)510.81510.8= MSR/MSE = 18.9≈ 0
Error (SSE)914.83426.9
Total1425.635
  • FF = 18.9, p0p \approx 0 \Rightarrow reject H0:β1=0H_0:\beta_1=0. The linear relationship is statistically significant.

Step 4 — Coefficient table

PredictorCoefficientStd. Errorttpp
Intercept (b0b_0)48.44
Price (b1b_1)0.1320.034.36≈ 0
  • t=4.36t = 4.36 matches F=t2F = t^2 (4.36219.04.36^2 \approx 19.0; rounding). pp small → reject H0H_0.
  • Interpretation: For every ₹ 1000 increase in price, the predicted satisfaction score rises by 0.132 points.

⚠️ Exam tip: This slope is counter‑intuitive (higher price → higher satisfaction). Regression describes the sample; the data may reflect that higher‑priced computers satisfy certain customers. Always check real‑world plausibility separately.

Step 5 — Residual diagnostics

  • Standardized residuals: Two values below –2 (–2.48, –2.12) — possible outliers (points far below the regression line).
  • Residuals vs. x: No funnel or curve, but not a perfect band. Some pattern suggests omitted variables (e.g., brand, features).
  • Residuals vs. y: Shows a trend — again hints that more predictors are needed.

Key takeaways — Example 1

  • R² = 0.36: price alone explains little of satisfaction.
  • Relationship is significant despite low R² (FF test rejects β1=0\beta_1=0).
  • Slope is positive — data says higher price was associated with higher satisfaction in this sample.
  • Residual analysis flags outliers and missing predictors → multiple regression needed.

Example 2: Manjula Nayak — Household Debt (99 Acres)

Context — ~500 Bengaluru households. Question: Is first income a significant determinant of household debt?

  • Dependent variable yy = household debt (₹)
  • Independent variable xx = first income (₹)

Step 1 — Scatter plot

First income vs. debt. A linear trend is barely visible; large variation in debt for a given income.

Step 2 — Regression equation & R²

y^=32976+0.04x\hat{y} = 32\,976 + 0.04\,x
  • R² = 0.31 — income only explains 31 % of debt variation.
  • Correlation r=0.310.56r = \sqrt{0.31} \approx 0.56 (positive, moderate).

Step 3 — ANOVA and overall significance

SourceSSdfMSFFpp
Regression (SSR)1.86×10111.86 \times 10^{11}11.86×10111.86 \times 10^{11}= 228≈ 0
Error (SSE)4.08×10114.08 \times 10^{11}4988.19×1088.19 \times 10^8
Total5.94×10115.94 \times 10^{11}499
  • FF = 228, p0p \approx 0 → reject H0H_0. Linear relationship is significant.

Step 4 — Coefficient table

PredictorCoefficientStd. Errorttpp
Intercept (b0b_0)32 976
First income (b1b_1)0.040.00215.1≈ 0
  • t=15.1t = 15.1 (very large). pp tiny → strong evidence against β1=0\beta_1=0.
  • Interpretation: For every ₹ 1 increase in first income, debt rises by ₹ 0.04.

Step 5 — Residual diagnostics

  • Standardized residuals: Few values outside ±2, but mostly within range.
  • Residuals vs. x: Oval shape — not a perfect band, no funnel or curve.
  • Residuals vs. y: Shows a trend, again hinting that other variables (ownership, monthly payments, etc.) affect debt.

Key takeaways — Example 2

  • R² = 0.31: income alone explains little of debt.
  • Relationship is highly significant (F=228F=228, t=15.1t=15.1).
  • Slope 0.04 means a 1‑rupee increase in income is associated with 0.04 rupee more debt.
  • Residual patterns signal that a multiple regression (next module) will better capture debt drivers.

Common workflow across both examples

flowchart LR
    A[Scatter plot: linear trend?] --> B[Fit OLS: get equation & R²]
    B --> C{Check overall F-test}
    C -->|p < α| D[Significant relationship]
    C -->|p ≥ α| E[Model not useful]
    D --> F[Inspect individual t-tests for coefficients]
    D --> G[Residual diagnostics: outliers, patterns]
    G --> H[If patterns remain → consider multiple regression]

Exam tip: When R² is low but the overall FF‑test is significant, the model is still statistically useful but practically weak — other variables are needed. Residual plots that show trends (not random scatter) are the main clue.

SLR Applications: Monthly Payment vs. Debt

Intuition: Households with higher monthly payments (loans, credit cards, utilities) are expected to carry more debt. This second example uses monthly payment as the independent variable xx to predict debt yy, comparing results with the earlier income-based model.

Estimated Regression Equation

Using the same 500-household dataset, the least‑squares regression yields:

y^=b0+b1x=28791+2.94x\hat{y} = b_0 + b_1 x = 28\,791 + 2.94\,x

  • b1=2.94b_1 = 2.94: for every one‑rupee increase in monthly payment, predicted debt increases by 2.94 rupees.
  • Caution: With only one predictor, this coefficient captures both the direct effect and correlations with omitted variables; it is not a pure marginal effect.

Goodness‑of‑Fit: R2R^2 and Correlation

MeasureValueInterpretation
R2R^20.37Monthly payment explains 37% of the variability in debt.
r=R2r = \sqrt{R^2}0.60Positive correlation between monthly payment and debt.

Comparison with earlier model (Debt vs. First Income):

ModelR2R^2rr
Debt vs. Income0.310.56
Debt vs. Monthly Payment0.370.60

The monthly‑payment model is marginally better, but both leave >60% of variance unexplained – strong evidence that debt depends on multiple factors.

ANOVA and Hypothesis Tests

Null hypothesis: H0:β1=0H_0: \beta_1 = 0 (no linear relationship).
Alternative: H1:β10H_1: \beta_1 \neq 0.

SourceSum of SquaresdfMean SquareFFpp-value
Regression (SSR)2.18×10112.18 \times 10^{11}12.18×10112.18 \times 10^{11}2880\approx 0
Error (SSE)3.80×10113.80 \times 10^{11}498757268785757\,268\,785
Total (SST)499
  • Standard error of estimate: MSE=75726878527518\sqrt{\text{MSE}} = \sqrt{757\,268\,785} \approx 27\,518 rupees – typical prediction error.
  • F=288F = 288, p0p \approx 0 → reject H0H_0; the linear relationship is statistically significant.

Coefficient details for b1b_1:

CoefficientStd. Errortt statisticpp-value
Monthly payment (b1b_1)2.940.174t=2.94/0.174=16.95t = 2.94 / 0.174 = 16.950\approx 0
  • The tt‑test confirms β10\beta_1 \neq 0, identical conclusion to the FF‑test.

Residual Analysis

Standardized residuals: Several observations lie below −2 or above +2, suggesting potential outliers.

Residual vs. xx (monthly payment): Forms an oval shape – not a perfect random band, but no obvious funnel or curvature. This points to heteroscedasticity or non‑linearity that may be addressed by including additional predictors.

Residual vs. y^\hat{y}: Similar pattern reinforces that the model fails to capture all systematic variation.

Exam tip: An oval‑shaped residual plot (instead of a horizontal band) is a classic sign that a simple linear regression is misspecified – often resolved by moving to multiple regression.

Key takeaways

  • Monthly payment explains 37% of debt variability (R2=0.37R^2 = 0.37, r=0.60r = 0.60), slightly better than income (31%).
  • Both slope and overall model are highly significant (F=288F=288, t=16.95t=16.95, p0p \approx 0).
  • Residual analysis reveals several outliers and a non‑random pattern, indicating omitted variables.
  • Coefficient b1=2.94b_1 = 2.94 cannot be interpreted as a pure marginal effect in simple regression.

Module Summary

This module introduced the fundamentals of measuring and modelling linear relationships between two variables.

Key concepts covered:

  1. Covariance and correlation – quantify the direction and strength of linear association. Cov(X,Y)=(xixˉ)(yiyˉ)n1,r=Covsxsy\text{Cov}(X,Y) = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{n-1}, \quad r = \frac{\text{Cov}}{s_x s_y}

    • Distinguish explainable vs. spurious correlation.
  2. Simple linear regression model Y=β0+β1X+ϵY = \beta_0 + \beta_1 X + \epsilon with E(Y)=β0+β1X\mathbb{E}(Y) = \beta_0 + \beta_1 X.

  3. Least‑squares estimation – sample statistics b0b_0 and b1b_1 estimate population parameters.

  4. Coefficient of determination R2R^2 – proportion of YY’s variability explained by XX.

  5. Assumptions about errors ϵ\epsilon – independence, constant variance, normality – required for valid inference.

  6. Hypothesis teststt‑test for β1\beta_1 and FF‑test for overall significance (equivalent in SLR).

  7. Residual analysis – plots and standardized residuals used to check assumptions and detect outliers/influential points.

The next module extends this framework to multiple linear regression, where YY depends on several XX variables.

Key takeaways

  • Covariance and correlation measure association; regression models the relationship.
  • R2R^2 is the key measure of fit; low R2R^2 indicates omitted variables.
  • Hypothesis tests (tt, FF) assess statistical significance of the linear relationship.
  • Residual plots are essential for model validation.

Continuous Probability Distributions

Key Concepts: Continuous vs. Discrete

A continuous random variable can take any value within an interval (finite or infinite), including fractional values. Examples: time between customer arrivals, fluid volume in a bottle, oven temperature. Unlike discrete variables (e.g., number of defects, number of customers), continuous variables have a probability density function (pdf) f(x)f(x), not a probability mass function.

FeatureDiscreteContinuous
Possible valuesCountable (integers)Uncountable (any real in an interval)
Probability at a pointP(X=x)=f(x)P(X=x)=f(x) (the mass)P(X=x)=0P(X=x)=0 (area under a point is zero)
Probability for an intervalSum of f(x)f(x) over values in [a,b][a,b]Integral of f(x)dxf(x)\,dx from aa to bb
Total probabilityf(x)=1\sum f(x)=1f(x)dx=1\int f(x)\,dx=1

Probability Density Function (PDF) and Cumulative Distribution Function (CDF)

For a continuous random variable XX:

  • pdf: f(x)0f(x) \ge 0 for all xx, and f(x)dx=1\int_{-\infty}^{\infty} f(x)\,dx = 1.
  • CDF: F(x)=P(Xx)=xf(t)dtF(x) = P(X \le x) = \int_{-\infty}^{x} f(t)\,dt.
  • Tail probability: Fˉ(x)=P(X>x)=1F(x)\bar{F}(x) = P(X > x) = 1 - F(x).

The probability that XX lies in [a,b][a,b] is the area under f(x)f(x) between aa and bb:

P(aXb)=abf(x)dx=F(b)F(a).P(a \le X \le b) = \int_{a}^{b} f(x)\,dx = F(b) - F(a).

Exam tip: For a continuous random variable, P(X=any single value)=0P(X = \text{any single value}) = 0. Always think in terms of intervals.

Expectation and Variance

  • Expectation (mean): E[X]=xf(x)dxE[X] = \int_{-\infty}^{\infty} x\,f(x)\,dx (replace sum with integral).
  • Variance: Var(X)=(xE[X])2f(x)dx\text{Var}(X) = \int_{-\infty}^{\infty} (x - E[X])^2\,f(x)\,dx.

Formulas mirror the discrete case, substituting summation with integration.


Uniform Distribution

A random variable is uniformly distributed over [L,U][L, U] if every value in that interval is equally likely. The pdf is constant:

f(x)=1UL,LxU,and f(x)=0 elsewhere.f(x) = \frac{1}{U - L}, \quad L \le x \le U, \quad \text{and } f(x)=0 \text{ elsewhere.}

Key formulas

QuantityExpression
CDF F(x)F(x)xLUL\displaystyle \frac{x - L}{U - L}
Tail probability Fˉ(x)\bar{F}(x)UxUL\displaystyle \frac{U - x}{U - L}
Probability in [a,b][a,b]baUL\displaystyle \frac{b - a}{U - L}
Expectation E[X]E[X]L+U2\displaystyle \frac{L + U}{2}
Variance Var(X)\text{Var}(X)(UL)212\displaystyle \frac{(U - L)^2}{12}

Worked Example: Driving Time

Nilesh Shah’s driving time from Vadodara to Ahmedabad is uniformly distributed between L=100L=100 minutes and U=140U=140 minutes.

  • Expected time: E[X]=100+1402=120E[X] = \frac{100+140}{2} = 120 minutes.
  • P(X130)P(X \le 130): F(130)=130100140100=3040=0.75F(130) = \frac{130-100}{140-100} = \frac{30}{40} = 0.75 (75% chance of 130 minutes or less).
  • P(X>105)P(X > 105): Fˉ(105)=14010540=3540=0.875\bar{F}(105) = \frac{140-105}{40} = \frac{35}{40} = 0.875 (87.5% chance of more than 105 minutes).
  • P(X=120)P(X = 120): =0=0 (any single point has zero probability for a continuous variable).

Note: Probabilities for intervals (e.g., P(105<X<130)=F(130)F(105)=0.750.125=0.625P(105 < X < 130) = F(130)-F(105) = 0.75 - 0.125 = 0.625) can be computed similarly.


Key takeaways

  • Continuous random variables have a pdf; probabilities are areas under the curve.
  • The CDF gives P(Xx)P(X \le x); tail probability is 1CDF1-\text{CDF}.
  • For continuous variables, P(X=a)=0P(X=a)=0 for any specific aa.
  • Expectation and variance use integrals instead of sums.
  • Uniform distribution: constant pdf over [L,U][L,U]; E[X]=L+U2E[X]=\frac{L+U}{2}, Var(X)=(UL)212\text{Var}(X)=\frac{(U-L)^2}{12}.
  • In a uniform model, probability is proportional to interval length.

Uniform Distribution Example

The uniform distribution models a random variable that is equally likely to take any value within a given interval [L,U][L, U]. Intuitively: every value in that range has the same chance—there is no “peaked” area.

Worked Example: Battery Life of a Phone

Meena’s phone battery lasts between 8 and 12 hours before needing a charge. Let XX = time (in hours) until recharge. Model: XUniform(L=8,U=12)X \sim \text{Uniform}(L=8, U=12).

PDF (not needed for calculations here):

f(x)=1UL=14,8x12f(x) = \frac{1}{U-L} = \frac{1}{4}, \quad 8 \le x \le 12

CDF for any xx in [L,U][L,U]:

F(x)=P(Xx)=xLULF(x) = P(X \le x) = \frac{x - L}{U - L}

1. Probability that recharge needed within 9 hours (P(X9)P(X \le 9))

F(9)=98128=14=0.25F(9) = \frac{9-8}{12-8} = \frac{1}{4} = 0.25

25% chance the phone needs charging in the first 9 hours.

2. Probability that battery lasts at least 11 hours (P(X11)P(X \ge 11))

P(X11)=1F(11)=1211128=0.25P(X \ge 11) = 1 - F(11) = \frac{12-11}{12-8} = 0.25

25% chance the battery lasts 11 hours or more.

3. 80th percentile – the value xx such that P(Xx)=0.8P(X \le x) = 0.8.

x8128=0.8x=8+(0.8)(4)=11.2 hours\frac{x - 8}{12 - 8} = 0.8 \quad \Rightarrow \quad x = 8 + (0.8)(4) = 11.2 \text{ hours}

There is an 80% chance the phone will need charging within 11.2 hours.


Exam tip: For uniform distributions, percentiles are a straight linear interpolation: x=L+p(UL)x = L + p \cdot (U-L).

Discrete Uniform – Reminder

The discrete uniform distribution assigns equal probability to a finite set of values (e.g., a fair die: P(X=k)=1/6P(X=k)=1/6 for k=1,,6k=1,\dots,6). The continuous version is its natural extension to an interval.

Key takeaways (Uniform)

  • XUniform(L,U)X \sim \text{Uniform}(L,U): all values equally likely in [L,U][L,U].
  • CDF: F(x)=xLULF(x) = \frac{x-L}{U-L} for LxUL \le x \le U.
  • Percentile pp: x=L+p(UL)x = L + p \cdot (U-L).
  • Used when only the minimum and maximum are known and nothing else.

Exponential Distribution

The exponential distribution models the time between random events that occur at a constant average rate λ\lambda (events per unit time). Intuitively: if events happen “on average every 1/λ time units”, the waiting time until the next event follows an exponential distribution.

Formal Definition

Let XX = time between events. X0X \ge 0.

Probability density function (PDF):

f(x)=λeλx,x0f(x) = \lambda e^{-\lambda x}, \quad x \ge 0

Cumulative distribution function (CDF):

F(x)=P(Xx)=1eλxF(x) = P(X \le x) = 1 - e^{-\lambda x}

Tail probability (survival function):

Fˉ(x)=P(X>x)=eλx\bar{F}(x) = P(X > x) = e^{-\lambda x}

Probability between aa and bb (0a<b0 \le a < b):

P(a<Xb)=Fˉ(a)Fˉ(b)=eλaeλbP(a < X \le b) = \bar{F}(a) - \bar{F}(b) = e^{-\lambda a} - e^{-\lambda b}

Mean and Variance

PropertyFormulaNote
Mean E[X]E[X]1λ\frac{1}{\lambda}Average waiting time
Variance Var(X)\text{Var}(X)1λ2\frac{1}{\lambda^2}
Standard deviation1λ\frac{1}{\lambda}Equal to the mean – a unique property

The mean equals the standard deviation for the exponential distribution. This is a quick check: if the sample mean and sample SD are very different, the data may not be exponential.

Key Properties

  • Skewed right – the PDF peaks at x=0x=0 and decays; most probability lies near zero.
  • Memoryless propertyP(X>s+tX>s)=P(X>t)P(X > s+t \mid X > s) = P(X > t). The future waiting time does not depend on how long you have already waited.
  • Connection to Poisson: If events occur at rate λ\lambda per unit time (Poisson process), the waiting time between consecutive events is exponential with mean 1/λ1/\lambda, and the number of events in a fixed interval is Poisson with mean λt\lambda t.

Applications

  • Time to complete a manual task (assembly, phone call)
  • Lifetime of electronic components (bulbs, circuits)
  • Time until equipment requires repair
  • Waiting time in a queue (call center, customer service)

Worked Example: Call Center Waiting Time

Megha’s waiting time (in minutes) for a service desk agent is exponential with mean 2 minutes. So λ=1/2=0.5\lambda = 1/2 = 0.5 per minute.

1. Probability she waits less than 1 minute (P(X<1)P(X < 1))

F(1)=1e0.5×1=1e0.50.393F(1) = 1 - e^{-0.5 \times 1} = 1 - e^{-0.5} \approx 0.393

2. Probability she waits more than 3 minutes (P(X>3)P(X > 3))

Fˉ(3)=e0.5×3=e1.50.223\bar{F}(3) = e^{-0.5 \times 3} = e^{-1.5} \approx 0.223

3. Probability she waits between 1 and 3 minutes (P(1<X3)P(1 < X \le 3))

e0.5×1e0.5×3=e0.5e1.50.60650.2231=0.383e^{-0.5 \times 1} - e^{-0.5 \times 3} = e^{-0.5} - e^{-1.5} \approx 0.6065 - 0.2231 = 0.383

4. 90th percentile – find xx such that F(x)=0.9F(x) = 0.9:

1e0.5x=0.9e0.5x=0.10.5x=ln(0.1)x=2ln(0.1)4.605 minutes1 - e^{-0.5 x} = 0.9 \quad \Rightarrow \quad e^{-0.5 x} = 0.1 \quad \Rightarrow \quad -0.5 x = \ln(0.1) \quad \Rightarrow \quad x = -2 \ln(0.1) \approx 4.605 \text{ minutes}

90% of calls are answered within about 4.6 minutes.

Computation in Excel

Use the function =EXPON.DIST(x, λ, cumulative):

  • cumulative = FALSE returns the PDF f(x)f(x).
  • cumulative = TRUE returns the CDF F(x)F(x).

For inverse calculations (given probability, find xx), Excel provides =EXPON.INV(probability, λ) or use the formula x=ln(1p)λx = -\frac{\ln(1-p)}{\lambda} for the pp-th percentile.

flowchart LR
    A[Given: λ or mean] --> B{Calculate?}
    B --> C[Probability: P(X ≤ x) or P(X > x) or P(a<X≤b)]
    B --> D[Percentile: find x given p]
    C --> E[Use F(x)=1-e^{-λx} or tail e^{-λx}]
    D --> F[Solve x = -ln(1-p)/λ]

Key takeaways (Exponential)

  • Models waiting time between random events at constant rate λ.
  • PDF: f(x)=λeλxf(x) = \lambda e^{-\lambda x}, CDF: F(x)=1eλxF(x) = 1 - e^{-\lambda x}.
  • Mean = Standard deviation = 1/λ1/\lambda.
  • Memoryless: P(X>s+tX>s)=P(X>t)P(X > s+t \mid X > s) = P(X > t).
  • Connected to Poisson: number of events per interval ~ Poisson(λt), waiting time ~ Exponential(λ).
  • Use EXPON.DIST in Excel for probabilities; EXPON.INV for percentiles.

Memoryless Property of the Exponential Distribution

The memoryless property is a defining characteristic of the exponential distribution. Intuitively: if you are waiting for an event that follows an exponential distribution, the probability of waiting an additional yy units does not depend on how long you have already waited — the process "forgets" the elapsed time.

Formal definition

Let XExponential(λ)X \sim \text{Exponential}(\lambda), with mean 1/λ1/\lambda. For any t0>0t_0 > 0 and y>0y > 0,

P(X>t0+yX>t0)=P(X>y).P(X > t_0 + y \mid X > t_0) = P(X > y).

Equivalently, the remaining time Y=Xt0Y = X - t_0 conditional on X>t0X > t_0 has the same exponential distribution as XX:

P(Y>y)=eλy.P(Y > y) = e^{-\lambda y}.

Derivation

The tail probability of an exponential is P(X>x)=eλxP(X > x) = e^{-\lambda x}.

P(Y>y)=P(X>t0+yX>t0)=P(X>t0+y)P(X>t0)=eλ(t0+y)eλt0=eλy.\begin{aligned} P(Y > y) &= P(X > t_0 + y \mid X > t_0) \\ &= \frac{P(X > t_0 + y)}{P(X > t_0)} \\ &= \frac{e^{-\lambda (t_0 + y)}}{e^{-\lambda t_0}} \\ &= e^{-\lambda y}. \end{aligned}

Thus YY has the same distribution as XX.

Exam tip: The memoryless property is unique to the exponential distribution (and its discrete analogue, the geometric). It is the reason exponential waiting times are used in queueing models: the future waiting time is independent of the past.

Worked example — Shanti's bus wait

Shanti waits for a bus. Waiting time XX (minutes) is exponential with mean 2020 minutes.

λ=120=0.05,tails: P(X>x)=e0.05x.\lambda = \frac{1}{20} = 0.05 ,\quad \text{tails: } P(X > x) = e^{-0.05 x}.
QuestionComputationResult
Probability she waits 15\le 15 minP(X15)=1e0.0515P(X \le 15) = 1 - e^{-0.05 \cdot 15}0.5280.528
Probability she waits >30> 30 minP(X>30)=e0.0530P(X > 30) = e^{-0.05 \cdot 30}0.2230.223
Probability she waits between 1515 and 3030 minP(15<X30)=e0.0515e0.0530P(15 < X \le 30) = e^{-0.05\cdot 15} - e^{-0.05 \cdot 30}0.2490.249
Given she already waited 1010 min, probability she waits another 10\ge 10 minP(X>20X>10)=e0.0510P(X > 20 \mid X > 10) = e^{-0.05 \cdot 10}0.6070.607
Given she already waited 2020 min, probability she waits another 10\ge 10 minP(X>30X>20)=e0.0510P(X > 30 \mid X > 20) = e^{-0.05 \cdot 10}0.6070.607

The last two results are identical — the waiting time resets regardless of elapsed time, illustrating the memoryless property.


Key takeaways

  • Memoryless property: P(X>t0+yX>t0)=P(X>y)P(X > t_0 + y \mid X > t_0) = P(X > y).
  • Equivalent to the remaining time having the same exponential distribution.
  • Only the exponential (continuous) and geometric (discrete) have this property.
  • Conditional waiting times are computed using eλye^{-\lambda y} — no dependence on t0t_0.
  • Always check that the random variable is exponential before applying memorylessness.

Relation Between Exponential and Poisson Distributions

The exponential distribution is the waiting time distribution that underlies a Poisson process. If events occur according to a Poisson process with rate λ\lambda (average number of events per unit time or space), then:

  • The number of events in a fixed interval of length tt is Poisson(λt)\text{Poisson}(\lambda t).
  • The time between consecutive events (interarrival times) is Exponential(λ)\text{Exponential}(\lambda).

This duality allows us to switch between counting problems and waiting‑time problems.

ProcessInterarrival timesCounting (number of events in tt)
DeterministicFixed, constantFixed number λt\lambda t
PoissonExponential(λ\lambda)Poisson(λt\lambda t)

Example — highway defects

Recall the Solapur highway example: defects occur as a Poisson process with average 33 defects per kilometer.

λ=3 defects/km.\lambda = 3 \text{ defects/km}.
  • Distance between defects XX is Exponential(λ=3)\text{Exponential}(\lambda = 3) with mean 1/30.3331/3 \approx 0.333 km.
  • Number of defects in LL km is Poisson(3L)\text{Poisson}(3L).
QuestionComputationResult
Probability of at least 0.50.5 km without a defectP(X>0.5)=e30.5=e1.5P(X > 0.5) = e^{-3 \cdot 0.5} = e^{-1.5}0.2230.223
Probability of at least 22 km without a defectP(X>2)=e32=e6P(X > 2) = e^{-3 \cdot 2} = e^{-6}0.0020.002

The same result can be obtained from the Poisson: P(zero defects in L km)=eλLP(\text{zero defects in }L\text{ km}) = e^{-\lambda L}.

Exam tip: Whenever you see a problem about “time between events” or “distance between occurrences”, check whether the process is Poisson. If yes, the interarrival time is exponential — use the exponential tail formula eλxe^{-\lambda x} directly.

Key takeaways

  • In a Poisson process, interarrival times are i.i.d. exponential with the same rate λ\lambda.
  • Average interarrival time = 1/λ1/\lambda; average number of events per unit time = λ\lambda.
  • Switching between Poisson and exponential: P(zero events in t)=eλt=P(interarrival time>t)P(\text{zero events in }t) = e^{-\lambda t} = P(\text{interarrival time} > t).
  • Memoryless property of the exponential explains the “lack of clustering” in a Poisson process — the hazard rate is constant.

Worked Example: Oil Change Service Time — Exponential & Poisson

Scenario: Rohit’s garage offers a 50% discount if an oil change takes more than 20 minutes. The average oil change time is 20 minutes. Assuming the time XX (in minutes) for one oil change follows an exponential distribution, we evaluate the risk of this promise. Later we shift to counting the number of oil changes YY in a fixed time window, which follows a Poisson distribution.

1. Time for a single oil change: Exponential model

If the mean time is μ=20\mu = 20 minutes, the rate parameter is λ=1μ=0.05\lambda = \frac{1}{\mu} = 0.05 per minute.
The exponential CDF: F(x)=P(Xx)=1eλxF(x) = P(X \le x) = 1 - e^{-\lambda x}.

Key relationship: Exponential distribution models the time between events (here, the time to complete one oil change).

Probability that time < 20 minutes (promise kept)

P(X<20)=F(20)=1e0.05×20=1e10.632P(X < 20) = F(20) = 1 - e^{-0.05 \times 20} = 1 - e^{-1} \approx 0.632

There is a 63.2% chance the oil change finishes within 20 minutes. Rohit will likely give many discounts.

Probability that time is between 15 and 30 minutes

P(15<X<30)=F(30)F(15)=(1e0.05×30)(1e0.05×15)=e0.75e1.50.4720.223=0.249P(15 < X < 30) = F(30) - F(15) = (1 - e^{-0.05 \times 30}) - (1 - e^{-0.05 \times 15}) = e^{-0.75} - e^{-1.5} \approx 0.472 - 0.223 = 0.249

There is a 24.9% chance the oil change takes between 15 and 30 minutes.

EventProbability
X<20X < 200.632
15<X<3015 < X < 300.249

2. Number of oil changes in a time window: Poisson model

Number of oil changes YY in a fixed time period tt follows a Poisson distribution with mean Λ=λt\Lambda = \lambda t, where λ\lambda is the exponential rate (0.05 per minute). This connection holds because the exponential distribution models inter-arrival times of a Poisson process.

Four‑hour morning shift (240 minutes)

Λ=0.05×240=12YPoisson(12)\Lambda = 0.05 \times 240 = 12 \quad \Rightarrow \quad Y \sim \text{Poisson}(12)

Probability of more than 15 oil changes in 4 hours:
P(Y15)=1P(Y14)P(Y \ge 15) = 1 - P(Y \le 14). Using Poisson tables or software: P(Y15)0.228P(Y \ge 15) \approx 0.228

Eight‑hour day (480 minutes)

Λ=0.05×480=24YPoisson(24)\Lambda = 0.05 \times 480 = 24 \quad \Rightarrow \quad Y \sim \text{Poisson}(24)

Probability of more than 30 oil changes in 8 hours:
P(Y30)0.132P(Y \ge 30) \approx 0.132

Time windowAverage oil changes (Λ\Lambda)P(Ythreshold)P(Y \ge \text{threshold})Threshold
4 hours (morning)120.22815
8 hours (full day)240.13230

Relationship between Exponential and Poisson

flowchart LR
  A[Exponential: time per oil change<br>mean=20 min, λ=0.05] --> B[Poisson: number of oil changes<br>in time t, mean Λ=λ·t]
  B --> C[4-hour shift: Λ=12]
  B --> D[8-hour day: Λ=24]

The Poisson distribution counts events when the inter‑event times are i.i.d. exponential with the same rate λ\lambda.

Key Takeaways

  • Exponential models the time until one event (oil change). Use λ=1/mean\lambda = 1/\text{mean}.
  • Poisson models the number of events in a fixed interval when events occur at a constant average rate.
  • The two are linked: Λ=λ×t\Lambda = \lambda \times t.
  • Rohit’s offer is risky: 63% chance of finishing on time (but 37% chance of discount). The probabilities of completing many oil changes per shift are modest (22.8% for >15 in 4 hours, 13.2% for >30 in 8 hours).
  • Exam tip: When a problem gives an average time and asks for counts over a time period, switch from exponential to Poisson using Λ=rate×time\Lambda = \text{rate} \times \text{time}. Always check if the exponential inter‑event time assumption is justified (often stated as “random arrivals” or “memoryless” process).

The Normal Random Variable and its Distribution

The normal distribution is the most widely used continuous probability distribution. It models many naturally occurring phenomena—heights, weights, test scores, rainfall—and is central to statistical inference. Its probability density function (PDF) produces the familiar bell-shaped curve, symmetric about the mean.

f(x)=1σ2πe(xμ)22σ2,<x<f(x) = \frac{1}{\sigma\sqrt{2\pi}} \, e^{-\frac{(x-\mu)^2}{2\sigma^2}}, \quad -\infty < x < \infty

The entire family of normal distributions is differentiated by two parameters:

  • Mean μ\mu – determines the centre; can be any real number.
  • Standard deviation σ\sigma – determines the spread; σ>0\sigma > 0.

Properties of the Normal Curve

  • Highest point at x=μx = \mu, which is also the median and mode.
  • Symmetric about μ\mu: left half is a mirror image of the right half. Skewness = 0.
  • Tails extend to infinity in both directions, never touching the horizontal axis.
  • Total area under curve = 1 (like all PDFs). Because of symmetry, area to the left of μ\mu = 0.5; area to the right = 0.5.
  • Spread determined by σ\sigma: larger σ\sigma → wider, flatter curve; smaller σ\sigma → taller, narrower curve.

The Empirical Rule (68–95–99.7 Rule)

For any normal random variable XX, the percentage of values within kk standard deviations of the mean is fixed:

IntervalPercentage of valuesProbability
μ±1σ\mu \pm 1\sigma68.3%P(μσXμ+σ)=0.683P(\mu - \sigma \leq X \leq \mu + \sigma) = 0.683
μ±2σ\mu \pm 2\sigma95.4%P(μ2σXμ+2σ)=0.954P(\mu - 2\sigma \leq X \leq \mu + 2\sigma) = 0.954
μ±3σ\mu \pm 3\sigma99.7%P(μ3σXμ+3σ)=0.997P(\mu - 3\sigma \leq X \leq \mu + 3\sigma) = 0.997

Exam tip: The empirical rule provides quick probability approximations and is often tested directly.

The Standard Normal Distribution

A normal distribution with μ=0\mu = 0 and σ=1\sigma = 1 is called the standard normal distribution. Its random variable is denoted by ZZ instead of XX.

f(z)=12πez2/2,<z<f(z) = \frac{1}{\sqrt{2\pi}} \, e^{-z^2/2}, \quad -\infty < z < \infty

The cumulative distribution function (CDF) of ZZ is often written as Φ(z)\Phi(z) (capital phi), and the PDF as ϕ(z)\phi(z). Probability tables for Φ(z)\Phi(z) eliminate the need for integration.

Computing Normal Probabilities with Excel

Two built-in functions handle any normal distribution directly (no need to standardise):

  • NORM.DIST(x,mean,standard_dev,cumulative)(x, \text{mean}, \text{standard\_dev}, \text{cumulative})

    • cumulative = TRUE → returns Φ(x)=P(Xx)\Phi(x) = P(X \leq x) (CDF).
    • cumulative = FALSE → returns the PDF value at xx.
  • NORM.INV(probability,mean,standard_dev)(\text{probability}, \text{mean}, \text{standard\_dev})

    • Returns xx such that P(Xx)=probabilityP(X \leq x) = \text{probability} (inverse CDF).

Template example (general normal: μ=10\mu = 10, σ=3\sigma = 3)

InputComputed ProbabilityResult
x=13x = 13P(X13)P(X \leq 13)0.841
x=13x = 13P(X13)P(X \geq 13)0.159
a=7,b=13a = 7, b = 13P(7X13)P(7 \leq X \leq 13)0.683

For inverse:

  • Enter cumulative probability 0.841 → get x=13x = 13.
  • Enter interval probability 0.683 → get a=7a = 7, b=13b = 13.

Worked Examples: Standard Normal Probabilities

Set μ=0\mu = 0, σ=1\sigma = 1 in the template.

Example 1

ProbabilityResult
P(Z1)P(Z \leq -1)0.159
P(Z1)P(Z \geq -1)0.841
P(Z1.5)P(Z \geq -1.5)0.933
P(Z2.5)P(Z \geq -2.5)0.994
P(3<Z0)P(-3 < Z \leq 0)0.499

Note: P(Z=a)=0P(Z = a) = 0 for any continuous random variable, so P(Za)=P(Z<a)P(Z \leq a) = P(Z < a) and P(Za)=P(Z>a)P(Z \geq a) = P(Z > a).

Example 2

ProbabilityResult
P(0Z0.8)P(0 \leq Z \leq 0.8)0.288
P(1.5Z0)P(-1.5 \leq Z \leq 0)0.433
P(Z0.4)P(Z \geq 0.4)0.345
P(Z0.2)P(Z \geq -0.2)0.579
P(Z1.2)P(Z \leq 1.2)0.885
P(Z0.7)P(Z \leq -0.7)0.242

Example 3: Inverse Calculations

ConditionRange of zz
Area to the left of zz is 0.21z0.806z \leq -0.806 (i.e., z=0.806z = -0.806)
Area between z-z and +z+z is 0.91.64z+1.64-1.64 \leq z \leq +1.64
Area between z-z and +z+z is 0.20.25z+0.25-0.25 \leq z \leq +0.25
Area to the left of zz is 0.955z2.58z \leq 2.58 (i.e., z=2.58z = 2.58)
Area to the right of zz is 0.692z0.502z \geq -0.502 (i.e., z=0.502z = -0.502)

Key Takeaways

  • The normal distribution is bell-shaped, symmetric about μ\mu, with μ=\mu = median == mode.
  • It is parameterised by μ\mu (centre) and σ\sigma (spread).
  • The empirical rule: ≈68% within 1σ, ≈95% within 2σ, ≈99.7% within 3σ.
  • The standard normal ZZ has μ=0\mu = 0, σ=1\sigma = 1; its CDF is Φ(z)\Phi(z).
  • Excel: NORM.DIST for cumulative/PDF, NORM.INV for inverse; both work for any normal.
  • For continuous variables, point probabilities are zero; probabilities always refer to intervals.

Standard Normal Distribution

The standard normal distribution is the symmetric, bell-shaped distribution centered at 0 with a standard deviation of 1. Its random variable is denoted ZZ. This distribution serves as the universal reference for all normal distributions — any normal variable can be transformed into a standard normal.

An important concept for statistical inference is the critical value. For a standard normal, a critical value zα/2z_{\alpha/2} is defined such that the tail probability to the right of it equals α/2\alpha/2:

P(Z>zα/2)=α/2P(Z > z_{\alpha/2}) = \alpha/2

By symmetry, zα/2-z_{\alpha/2} has a left‑tail probability of α/2\alpha/2. Consequently, the central probability between zα/2-z_{\alpha/2} and +zα/2+z_{\alpha/2} is 1α1-\alpha:

P(zα/2Zzα/2)=1αP(-z_{\alpha/2} \leq Z \leq z_{\alpha/2}) = 1-\alpha

The familiar 68‑95‑99.7 rule is a special case: for 1α=0.681-\alpha = 0.68, α/2=0.16\alpha/2 = 0.16, and z0.16=1z_{0.16} = 1.

Common critical values

1α1-\alpha (confidence level)α/2\alpha/2zα/2z_{\alpha/2}
0.800.101.28
0.900.051.64
0.950.0251.96
0.990.0052.58

Exam tip: Memorise the three critical values 1.64, 1.96, and 2.58 — they appear repeatedly in confidence intervals and hypothesis tests.

Two standard types of questions

  1. Given ZZ, find probability — use the standard normal table or template.
  2. Given probability, find ZZ — inverse lookup. Sketching the bell curve and shading the relevant area always helps avoid sign errors.

Converting any normal to the standard normal

If XN(μ,σ)X \sim N(\mu, \sigma), then the transformed variable

Z=XμσZ = \frac{X - \mu}{\sigma}

follows a standard normal distribution. ZZ measures how many standard deviations XX is away from the mean — positive above, negative below.

flowchart LR
  A[Original normal X] --> B[Compute Z = (X-µ)/σ]
  B --> C[Use standard normal table<br>to find probability]
  C --> D[Interpret result for X]

Worked example
Let XN(μ=10,  σ=2)X \sim N(\mu=10,\;\sigma=2). Find P(10<X<14)P(10 < X < 14).

  1. Convert boundaries:
    Z1=10102=0,Z2=14102=2Z_1 = \frac{10-10}{2} = 0, \quad Z_2 = \frac{14-10}{2} = 2
  2. Then P(10<X<14)=P(0<Z<2)P(10 < X < 14) = P(0 < Z < 2).
  3. From the standard normal table, P(0<Z<2)=0.4772P(0 < Z < 2) = 0.4772.

The same result could be obtained by directly using a normal template with μ=10\mu=10, σ=2\sigma=2; the conversion simply standardises the problem.

Key takeaways

  • Critical value zα/2z_{\alpha/2}: right‑tail area = α/2\alpha/2; symmetric about 0.
  • Central probability 1α1-\alpha lies between zα/2-z_{\alpha/2} and +zα/2+z_{\alpha/2}.
  • Common zα/2z_{\alpha/2} values: 1.28, 1.64, 1.96, 2.58 for confidence levels 80%, 90%, 95%, 99%.
  • Any normal XX can be transformed via Z=(Xμ)/σZ = (X-\mu)/\sigma to a standard normal.
  • ZZ tells the distance from the mean in standard deviation units.
  • Always sketch the curve and shade the area when solving probability problems.

Examples of Normal Distribution Applications

The normal distribution is a versatile model for many real-world variables. These worked examples illustrate how to compute probabilities for intervals, tails, and cumulative regions, and how to perform inverse calculations (percentiles) using given mean μ\mu and standard deviation σ\sigma. The key tool is the z‑score: z=(xμ)/σz = (x - \mu)/\sigma, which maps any xx to a standard normal N(0,1)N(0,1).

flowchart LR
  A[What do you need?] --> B{Probability}
  A --> C{Inverse (percentile)}
  B --> D[Less than x?] --> E[Cumulative CDF: P(X < x)]
  B --> F[Greater than x?] --> G[Tail: P(X > x) = 1 - CDF]
  B --> H[Between a and b?] --> I[Interval: CDF(b) - CDF(a)]
  C --> J[Given probability p, find x] --> K[Inverse CDF (quantile)]

Exam tip: Always check units (e.g., minutes vs. hours). A small mistake in input changes the entire answer.

1. Stock Returns (Munaf)

A stock fund has a mean annual return of μ=12%\mu = 12\% and a standard deviation σ=3%\sigma = 3\%. Returns are normally distributed.

  • Unsatisfactory (return <5%< 5\%):
    z=5123=2.33z = \frac{5-12}{3} = -2.33P(X<5%)=0.01P(X < 5\%) = 0.01 (1% chance).
  • Excellent (return >10%> 10\%):
    z=10123=0.667z = \frac{10-12}{3} = -0.667P(X>10%)=0.748P(X > 10\%) = 0.748 (74.8% chance).
  • Moderate (return between 5% and 10%):
    P(5%<X<10%)=P(X<10%)P(X<5%)=0.7480.01=0.243P(5\% < X < 10\%) = P(X < 10\%) - P(X < 5\%) = 0.748 - 0.01 = 0.243 (24.3% chance).
  • 90th percentile (inverse):
    • Cumulative: 90% of returns are less than 15.8%.
    • Tail: 90% of returns are greater than 8.1%.
    • Interval: 90% of returns lie between 7% and 17%.

Key mechanism: The normal distribution template directly uses μ\mu and σ\sigma to output these probabilities without manual z‑score calculation.

2. Screen Time (Bhavani)

Daily screen time of school kids: μ=8.4\mu = 8.4 hours, σ=2.5\sigma = 2.5 hours.

  • More than 4 hours:
    z=48.42.5=1.76z = \frac{4-8.4}{2.5} = -1.76P(X>4)=0.96P(X > 4) = 0.96 (96% of kids exceed 4 hours).
  • Between 6 and 12 hours:
    z6=68.42.5=0.96z_6 = \frac{6-8.4}{2.5} = -0.96, z12=128.42.5=1.44z_{12} = \frac{12-8.4}{2.5} = 1.44P(6<X<12)=0.757P(6 < X < 12) = 0.757 (75.7% of kids).
  • Top 20% (inverse):
    Need P(X<x)=0.8P(X < x) = 0.8x=10.5x = 10.5 hours. A kid with >10.5 hours is in the top 20%.
  • Bottom 20% (inverse):
    Need P(X<x)=0.2P(X < x) = 0.2x=6.3x = 6.3 hours. A kid with <6.3 hours is in the bottom 20%.
  • (Bonus) 80% interval: 80% of kids have screen time between 5.2 and 11.6 hours.

3. Exam Duration (Hirav)

Time to complete an exam: μ=150\mu = 150 minutes, σ=20\sigma = 20 minutes. 60 students.

  • 2 hours or less (≤120 min):
    z=12015020=1.5z = \frac{120-150}{20} = -1.5P(X120)=0.067P(X \leq 120) = 0.0670.067×6040.067 \times 60 \approx 4 students.
  • Between 2 and 3 hours (120–180 min):
    z120=1.5z_{120} = -1.5, z180=+1.5z_{180} = +1.5P(120<X<180)=0.866P(120 < X < 180) = 0.8660.866×60520.866 \times 60 \approx 52 students.
  • 3 hours or more (≥180 min):
    P(X180)=0.067P(X \geq 180) = 0.0670.067×6040.067 \times 60 \approx 4 students.

Exam tip: The symmetry of the normal distribution means probabilities at equal distances above and below the mean are identical. Here 120 and 180 min are both 1.5σ from the mean, giving the same tail probability (0.067).

4. Sugar Packet Weight (Naman)

Two filling machines; weights are normally distributed. Naman evaluates which machine is better.

Machineμ\mu (kg)σ\sigma (kg)P(underweight<1P(\text{underweight} < 1 kg)P(1X1.05)P(1 \leq X \leq 1.05)90% interval
11.010.020.309 (30.9%)0.669 (66.9%)[0.97, 1.04]
21.030.040.227 (22.7%)0.465 (46.5%)[0.96, 1.09]
  • Machine 1 has fewer underweight? No, 30.9% > 22.7%, so Machine 2 produces fewer underweight packets.
  • Machine 2 has a narrower range for 90% of packets? No, its interval is wider (0.96–1.09 vs. 0.97–1.04).
    Naman’s claim that 90% of packets lie between 0.99 and 1.01 is false for both machines.

Trade-off: Machine 2 reduces underweight risk but increases variability, making the middle‑90% range much broader.

5. Glass Thickness (Vibhor)

Glass sheet thickness: μ=3\mu = 3 mm, σ=0.12\sigma = 0.12 mm.

  • Thickness < 2.9 mm (cumulative):
    z=2.930.120.833z = \frac{2.9-3}{0.12} \approx -0.833P(X<2.9)=0.202P(X < 2.9) = 0.202 (20.2% of sheets too thin).
  • Thickness > 3.2 mm (tail):
    z=3.230.121.667z = \frac{3.2-3}{0.12} \approx 1.667P(X>3.2)=0.048P(X > 3.2) = 0.048 (4.8% too thick).
  • 95% thickness range (inverse):
    For a central probability of 0.95, the endpoints are 3±1.96×0.123 \pm 1.96 \times 0.12 → [2.76 mm, 3.24 mm].

Key takeaways

  • All calculations rely on the z‑score transformation z=(xμ)/σz = (x - \mu)/\sigma, linking any normal variable to the standard normal.
  • Three standard probability queries: cumulative (less than), tail (greater than), and interval (between). Use the CDF differences.
  • Inverse problems (percentiles) find the value xx for a given cumulative probability (e.g., top 20% → p=0.8p=0.8).
  • Always check units (hours vs. minutes, percentage vs. decimal) before plugging numbers into a template or formula.
  • Symmetry simplifies: P(X<μkσ)=P(X>μ+kσ)P(X < \mu - k\sigma) = P(X > \mu + k\sigma).

Normal Approximation to the Binomial Distribution

When n is large, computing binomial probabilities directly (via factorials in (nx)pxqnx\binom{n}{x} p^x q^{n-x}) becomes unwieldy. The normal distribution provides a remarkably accurate approximation because the binomial’s probability mass function is approximately bell‑shaped — especially when p is not too close to 0 or 1.

Conditions for a Good Approximation

The approximation works well when both:

np5andnq5(where q=1p)np \ge 5 \quad \text{and} \quad nq \ge 5 \quad (\text{where } q = 1-p)

If these hold, match the mean and variance of the normal to those of the binomial:

μ=npσ2=npq\mu = np \qquad \sigma^2 = npq

So we use YN(μ=np,  σ2=npq)Y \sim N(\mu = np,\; \sigma^2 = npq) to approximate XBin(n,p)X \sim \text{Bin}(n,p).

The Continuity Correction

Because the binomial is discrete and the normal is continuous, a continuity correction of ±0.5 is applied to improve accuracy.

Desired binomial probabilityContinuity‑corrected normal probability
P(Xa)P(X \le a)P(Ya+0.5)P(Y \le a + 0.5)
P(Xb)P(X \ge b)P(Yb0.5)P(Y \ge b - 0.5)
P(aXb)P(a \le X \le b)P(a0.5Yb+0.5)P(a - 0.5 \le Y \le b + 0.5)
P(X=k)P(X = k)P(k0.5Yk+0.5)P(k - 0.5 \le Y \le k + 0.5)

Exam tip: The continuity correction is the most common mistake. Always add/subtract 0.5; never approximate a discrete probability using a single point from a continuous distribution (that probability would be 0).

Worked Examples

Example 1: Unbiased coin, 16 tosses
n=16,  p=0.5n=16,\; p=0.5μ=8,  σ2=4  (σ=2)\mu=8,\; \sigma^2=4\;( \sigma=2).

  • Exact binomial: P(X5)=0.105P(X \le 5) = 0.105
    Normal approx: P(Y5.5)=0.1056(0.105)P(Y \le 5.5) = 0.1056 \quad (\approx 0.105)

  • Exact binomial: P(8X11)=0.5598P(8 \le X \le 11) = 0.5598
    Normal approx: P(7.5Y11.5)=0.5586(0.5598)P(7.5 \le Y \le 11.5) = 0.5586 \quad (\approx 0.5598)

Example 2: Invoices with errors (Kunal Poonawala, Junagadh)
n=100,  p=0.1n=100,\; p=0.1μ=10,  σ2=9  (σ=3)\mu=10,\; \sigma^2=9\;(\sigma=3).

  • Exact binomial: P(X=12)=0.09P(X = 12) = 0.09
    Normal approx: P(11.5Y12.5)=0.1052P(11.5 \le Y \le 12.5) = 0.1052 (close, though slightly off; approximation improves with larger npnp).

  • Exact binomial: P(X13)=0.876P(X \le 13) = 0.876
    Normal approx: P(Y13.5)=0.879(0.876)P(Y \le 13.5) = 0.879 \quad (\approx 0.876)

The approximation is reliable, especially when npnp and nqnq are well above 5.

Connection to the Poisson Distribution

The Poisson distribution can also be approximated by the normal when its mean λ\lambda is large. Moreover, for a binomial with small qq (failure probability), the variance npqnpnpq \approx np, making the binomial similar to a Poisson. Hence, in certain cases the Poisson can be approximated via the binomial → normal chain.


Key Takeaways

  • Normal approximation to the binomial is valid when np5np \ge 5 and nq5nq \ge 5.
  • Match mean μ=np\mu = np and variance σ2=npq\sigma^2 = npq.
  • Always apply a continuity correction (±0.5) because the binomial is discrete.
  • The approximation is remarkably accurate and is often used by software internally.

Linear Combinations of Random Variables (Normal Case)

Any linear combination of normally distributed random variables is itself normally distributed – not just its mean and variance, but the entire distribution.

General Results (any distribution)

Given random variables X1,X2,,XnX_1, X_2, \dots, X_n and constants a1,a2,,ana_1, a_2, \dots, a_n, define

Y=a1X1+a2X2++anXnY = a_1 X_1 + a_2 X_2 + \cdots + a_n X_n

Expectation (always linear):

E[Y]=a1E[X1]+a2E[X2]++anE[Xn]E[Y] = a_1 E[X_1] + a_2 E[X_2] + \cdots + a_n E[X_n]

Variance:

  • If the XiX_i are independent:

    Var(Y)=a12Var(X1)+a22Var(X2)++an2Var(Xn)\text{Var}(Y) = a_1^2 \text{Var}(X_1) + a_2^2 \text{Var}(X_2) + \cdots + a_n^2 \text{Var}(X_n)

  • If the XiX_i are correlated (not independent), covariance terms appear:

    Var(Y)=i=1nai2Var(Xi)+2i<jaiajCov(Xi,Xj)\text{Var}(Y) = \sum_{i=1}^n a_i^2 \text{Var}(X_i) + 2\sum_{i<j} a_i a_j \text{Cov}(X_i, X_j)

These formulas hold for any distributions of the XiX_i.

Special Case: Normally Distributed XiX_i

If each XiN(μi,σi2)X_i \sim N(\mu_i, \sigma_i^2) and they are jointly normal (or independent normal), then YY is also normally distributed:

YN ⁣(aiμi,  ai2σi2+2i<jaiajCov(Xi,Xj))Y \sim N\!\left( \sum a_i \mu_i,\; \sum a_i^2 \sigma_i^2 + 2\sum_{i<j} a_i a_j \text{Cov}(X_i, X_j) \right)

This property is unique to the normal family and is crucial for statistical inference (e.g., sums of normal data remain normal).

Exam tip: When a problem states “X1,X2,X_1, X_2, \dots are independent normal random variables,” any linear combination (like Xˉ\bar{X} or X1X2X_1 - X_2) is also normal. You only need to compute its mean and variance.


Key Takeaways

  • For any random variables, E[a1X1+]E[a_1 X_1 + \dots] is linear; variance adds with squares plus covariance terms if not independent.
  • For normal random variables, the linear combination is also normal — a key result for later use (e.g., Central Limit Theorem).
  • This property does not hold for most other distributions; it is special to the normal.

Linear Combinations of Normal Random Variables

A key property: any linear combination of independent normal random variables is itself normally distributed. This makes it possible to model sums, differences, and averages of normal data with a single normal distribution.

The Basic Result: (Y = aX + b)

If (X \sim N(\mu,\ \sigma^2)) and (Y = aX + b) (with constants (a) and (b)), then
[ Y \sim N\big(a\mu + b,\ a^2\sigma^2\big). ]

Intuition – Shifting and scaling a normal distribution preserves its bell shape; only the mean and variance change linearly.

Standardization as a Special Case

Set (a = \frac{1}{\sigma}) and (b = -\frac{\mu}{\sigma}):

[ Y = \frac{X - \mu}{\sigma} \sim N(0,1) ]

This is the standard normal random variable (Z).

Sum of Two Independent Normals

Let (X_1 \sim N(\mu_1, \sigma_1^2)) and (X_2 \sim N(\mu_2, \sigma_2^2)) be independent. Then
[ Y = X_1 + X_2 \sim N(\mu_1 + \mu_2,\ \sigma_1^2 + \sigma_2^2). ]

If the variables are not independent, the sum is still normal, but the variance includes covariance terms.

General Linear Combination

For (n) independent normal variables (X_i \sim N(\mu_i, \sigma_i^2)) and constants (a_1, \dots, a_n, b):

[ Y = a_1 X_1 + a_2 X_2 + \cdots + a_n X_n + b ]

has distribution

[ Y \sim N!\left( \sum_{i=1}^n a_i \mu_i + b,\ \sum_{i=1}^n a_i^2 \sigma_i^2 \right). ]

Important Special Cases: Sum and Sample Mean

Assume (X_1, X_2, \dots, X_n) are iid (independent and identically distributed) as (N(\mu, \sigma^2)).

QuantityDefinitionDistributionMeanVarianceStandard Deviation
Sum(S_n = \sum_{i=1}^n X_i)(N(n\mu,\ n\sigma^2))(n\mu)(n\sigma^2)(\sqrt{n},\sigma)
Sample mean(\bar{X} = \frac{1}{n}\sum_{i=1}^n X_i)(N(\mu,\ \sigma^2/n))(\mu)(\frac{\sigma^2}{n})(\frac{\sigma}{\sqrt{n}})

Exam tip: Standard deviations do not add up directly. For the sum, (\text{SD}(S_n) = \sqrt{n},\sigma); for the average, (\text{SD}(\bar{X}) = \sigma/\sqrt{n}). The variance reduces by a factor of (n) when averaging – this is the foundation of sampling precision.


Worked Examples

1. Piston–Cylinder Gap

Problem – Piston head radius (X_1 \sim N(30\ \text{mm},\ 0.0025\ \text{mm}^2)), cylinder inside radius (X_2 \sim N(30.25\ \text{mm},\ 0.0036\ \text{mm}^2)). The gap is (Y = X_2 - X_1). Find
(a) (P(Y \le 0)) (piston does not fit)
(b) (P(0.1 \le Y \le 0.35)) (optimal performance)

Solution
(Y) is normal because it is a linear combination of independent normals.

[ \begin{aligned} \mu_Y &= 30.25 - 30 = 0.25 \ \sigma_Y^2 &= 0.0025 + 0.0036 = 0.0061 \ \sigma_Y &= \sqrt{0.0061} \approx 0.078 \end{aligned} ]

(a)
[ P(Y \le 0) = \Phi!\left(\frac{0 - 0.25}{0.078}\right) \approx \Phi(-3.205) \approx 0.0007 ]

(b)
[ P(0.1 \le Y \le 0.35) = \Phi!\left(\frac{0.35-0.25}{0.078}\right) - \Phi!\left(\frac{0.1-0.25}{0.078}\right) \approx \Phi(1.282) - \Phi(-1.923) \approx 0.872 ]

Interpretation – Extremely low chance of misfit; ~87 % chance of optimal gap.

2. Average Height of Cotton Plants

Problem – Individual plant height after two weeks: (X_i \sim N(29.4\ \text{cm},\ 4.41\ \text{cm}^2)). For 20 plants, the sample mean (\bar{X}) is normal. Find the 95th percentile of (\bar{X}).

Solution
[ \bar{X} \sim N!\left(29.4,\ \frac{4.41}{20} = 0.2205\right),\quad \sigma_{\bar{X}} = \sqrt{0.2205} \approx 0.469 ]

The 95th percentile is
[ \mu + z_{0.05},\sigma_{\bar{X}} = 29.4 + 1.645 \times 0.469 \approx 30.17\ \text{cm}. ]

Notice that the standard deviation of the average (0.47 cm) is much smaller than that of an individual plant (2.1 cm) – averaging greatly reduces variability.

3. Stock Returns Comparison

Problem – Stock A: (X_A \sim N(8%,\ 2.25%^2)), Stock B: (X_B \sim N(9.5%,\ 4%^2)), independent.
Define (Y = X_B - X_A). Find:
(a) (P(X_A \text{ moderate})) meaning (5 \le X_A \le 10)
(b) (P(X_B \text{ excellent})) meaning (X_B \ge 10)
(c) (P(X_B > X_A)) i.e., (P(Y > 0))
(d) (P(Y \ge 2))

Solution

(a) (X_A \sim N(8, 2.25)).
[ P(5 \le X_A \le 10) = \Phi!\left(\frac{10-8}{1.5}\right) - \Phi!\left(\frac{5-8}{1.5}\right) \approx \Phi(1.333) - \Phi(-2) \approx 0.886 ]

(b) (X_B \sim N(9.5, 4)).
[ P(X_B \ge 10) = 1 - \Phi!\left(\frac{10-9.5}{2}\right) \approx 1 - \Phi(0.25) \approx 0.4013 ]

(c) (Y = X_B - X_A \sim N(1.5,\ 2.25+4=6.25)), so (\sigma_Y = 2.5).
[ P(Y > 0) = 1 - \Phi!\left(\frac{0-1.5}{2.5}\right) = 1 - \Phi(-0.6) \approx 0.726 ]

(d)
[ P(Y \ge 2) = 1 - \Phi!\left(\frac{2-1.5}{2.5}\right) = 1 - \Phi(0.2) \approx 0.421 ]


Key Takeaways

  • Any linear combination of independent normal random variables is normally distributed.
  • For (Y = \sum a_i X_i + b): mean = (\sum a_i \mu_i + b), variance = (\sum a_i^2 \sigma_i^2) (independence assumed).
  • Sum of iid normals: mean (n\mu), variance (n\sigma^2).
  • Sample mean of iid normals: mean (\mu), variance (\sigma^2/n) – precision improves with (n).
  • Difference of two independent normals: variance adds; subtract the means.
  • Use standardization to compute probabilities for any linear combination.

Chi-Square Distribution

The chi-square distribution arises naturally from squared standard normal variables. If ZN(0,1)Z \sim N(0,1), then X=Z2X = Z^2 follows a chi-square distribution with 1 degree of freedom. More generally, if Z1,Z2,,ZnZ_1, Z_2, \dots, Z_n are independent standard normal random variables, then

X=Z12+Z22++Zn2X = Z_1^2 + Z_2^2 + \cdots + Z_n^2

follows a chi-square distribution with nn degrees of freedom (denoted χn2\chi^2_n).

Intuitively, it measures the sum of squared deviations; because squares are always non‑negative, the distribution is defined only for positive values.

Properties

  • Single parameter: the degrees of freedom (kk).
  • Mean: μ=k\mu = k.
  • Variance: σ2=2k\sigma^2 = 2k.
  • Shape: right‑skewed for small kk; as kk increases, the skewness decreases and the density approaches a normal distribution (by the Central Limit Theorem).
  • Support: x>0x > 0.

Applications

  • Non‑parametric hypothesis tests (e.g., goodness‑of‑fit).
  • Feature selection and classification.
  • Testing independence in contingency tables (logistic regression).

Critical Values

The chi‑square critical value χα,k2\chi^2_{\alpha, k} is the value such that the right‑tail probability equals α\alpha:

P(Xχα,k2)=αP(X \geq \chi^2_{\alpha, k}) = \alpha

Unlike the standard normal, critical values depend on the degrees of freedom. The table below gives critical values for several α\alpha and kk (computed using Microsoft Excel’s CHISQ.DIST function).

kkα=0.20\alpha = 0.20α=0.10\alpha = 0.10α=0.05\alpha = 0.05α=0.01\alpha = 0.01
57.39.211.115.1
1013.416.018.323.2
1519.322.325.037.6
2025.028.431.437.6

Exam tip: As kk increases, critical values increase because the distribution spreads out (variance =2k=2k). The values in the last column are the largest because the tail probability α\alpha is smallest.

Computing in Excel

Use CHISQ.DIST(x, k, cumulative):

  • x: value of the chi‑square random variable.
  • k: degrees of freedom.
  • cumulative: TRUE returns the cumulative distribution function; FALSE returns the probability density function.

A template can automate mean, variance, probability calculations, and inverse (critical value) look‑up.

Key takeaways

  • Chi‑square is the sum of kk independent squared standard normals.
  • Mean = kk, variance = 2k2k.
  • Always positive, right‑skewed, converges to normal as kk \to \infty.
  • Critical values increase with kk; used in goodness‑of‑fit and independence tests.

Student’s t‑Distribution

The Student’s t‑distribution (or simply t‑distribution) is defined when a standard normal variable is divided by the square root of an independent chi‑square variable scaled by its degrees of freedom:

T=ZX/kT = \frac{Z}{\sqrt{X / k}}

where ZN(0,1)Z \sim N(0,1), Xχk2X \sim \chi^2_k, and ZZ and XX are independent. TT follows a t‑distribution with kk degrees of freedom.

Intuitively, the t‑distribution is used in place of the standard normal when the population variance is unknown and the sample size is small. It has fatter tails (more probability in the extremes) than the normal.

History

Discovered by William Sealy Gosset while working at the Guinness Brewery. He published under the pseudonym “Student” because his employer prohibited employees from publishing research. Hence the name Student’s t‑distribution.

Properties

  • Symmetric and bell‑shaped, centered at 0.
  • Mean: μ=0\mu = 0 (for k>1k > 1).
  • Variance: σ2=kk2\sigma^2 = \frac{k}{k-2} (for k>2k > 2; undefined for k2k \leq 2).
  • Shape: flatter (more spread) than the standard normal; as kk \to \infty, the t‑distribution converges to N(0,1)N(0,1).
  • Support: <t<-\infty < t < \infty.

Applications

  • Hypothesis tests about population means (especially small samples).
  • Comparing means of two populations.
  • Diagnostics in linear regression (e.g., t‑tests for coefficients).

Critical Values

Because the t‑distribution is symmetric, critical values are often defined for two‑tailed regions. The value tα/2,kt_{\alpha/2, k} is the positive number such that:

P(Ttα/2,k)=α/2P(T \geq t_{\alpha/2, k}) = \alpha/2

By symmetry, P(Ttα/2,k)=α/2P(T \leq -t_{\alpha/2, k}) = \alpha/2. Therefore P(tα/2,kTtα/2,k)=1αP(-t_{\alpha/2, k} \leq T \leq t_{\alpha/2, k}) = 1 - \alpha.

The table below gives tα/2,kt_{\alpha/2, k} for common α/2\alpha/2 and degrees of freedom (computed using Excel’s T.DIST function).

kkα/2=0.10\alpha/2 = 0.10α/2=0.05\alpha/2 = 0.05α/2=0.025\alpha/2 = 0.025α/2=0.005\alpha/2 = 0.005
51.482.022.574.03
101.371.812.233.17
151.341.752.132.95
201.331.732.092.85

Notice that as kk increases, the critical values decrease (the distribution becomes less flat) and approach the corresponding standard normal critical values (e.g., for α/2=0.025\alpha/2 = 0.025, z0.0251.96z_{0.025} \approx 1.96).

Computing in Excel

Use T.DIST(x, k, cumulative):

  • x: value of the t random variable.
  • k: degrees of freedom.
  • cumulative: TRUE for cumulative probability, FALSE for PDF.

For critical values, the inverse function T.INV or a template can be used.

Exam tip: The t‑distribution is flatter than the normal, so its critical values are larger than the corresponding normal critical values for small kk. As kk grows, they converge.

Key takeaways

  • t‑distribution: T=Z/χk2/kT = Z / \sqrt{\chi^2_k / k}.
  • Symmetric, zero‑mean, fatter tails than normal.
  • Variance =k/(k2)= k/(k-2); converges to standard normal as kk \to \infty.
  • Critical values decrease with increasing kk; used in mean hypothesis tests and regression diagnostics.

The F Distribution

The F distribution (Fisher–Snedecor distribution, after Ronald Fisher) models the ratio of two independent chi-square random variables, each divided by its own degrees of freedom.

F(k1,k2)=χk12/k1χk22/k2F(k_1, k_2) = \frac{\chi^2_{k_1} / k_1}{\chi^2_{k_2} / k_2}

Here k1k_1 = numerator degrees of freedom and k2k_2 = denominator degrees of freedom. The order matters: F(5,10)F(10,5)F(5,10) \neq F(10,5).

Properties

  • Defined only for positive values of the random variable.
  • Unimodal and right-skewed (long right tail).
  • Mean: k2k22\displaystyle \frac{k_2}{k_2 - 2} for k22k_2 \geq 2 (when k22k_2 \leq 2, the mean is undefined).
  • Standard deviation decreases as k2k_2 increases.
  • As both k1k_1 and k2k_2 become large, the PDF becomes sharply spiked around 11.

Where it is used

  • Analysis of variance (ANOVA)
  • Feature selection in machine learning
  • Testing overall fit of multiple linear regression models

Excel Function: F.DIST

In Excel, the function F.DIST(x, k1, k2, cumulative) computes probabilities.

ParameterMeaning
xValue of the F random variable
k1Numerator degrees of freedom
k2Denominator degrees of freedom
cumulativeTRUE → cumulative probability; FALSE → probability density

Inverse (critical values) can be obtained via F.INV(alpha, k1, k2) for right‑tail probability α\alpha.

Worked Example: Critical Values (Right‑Tail)

For an F‑distribution with given k1,k2k_1, k_2, the critical value Fα,k1,k2F_{\alpha, k_1, k_2} is the value such that the area to its right equals α\alpha.

Using an F‑distribution template (or Excel), with α=0.2,0.1,0.05,0.01\alpha = 0.2, 0.1, 0.05, 0.01:

(k1,k2)(k_1, k_2)F0.20F_{0.20}F0.10F_{0.10}F0.05F_{0.05}F0.01F_{0.01}
(5, 5)2.233.455.0510.97
(5, 10)1.802.523.335.64
(10, 5)2.193.304.7410.05
(20, 20)1.471.792.212.94

Exam tip: Swapping k1k_1 and k2k_2 changes critical values — always double‑check which is numerator and which is denominator. When k2k_2 is large, critical values approach 1 because the distribution becomes concentrated near 1.

Key takeaways

  • F(k1,k2)=(χk12/k1)/(χk22/k2)F(k_1, k_2) = (\chi^2_{k_1}/k_1) / (\chi^2_{k_2}/k_2) — ratio of independent scaled chi‑squares.
  • Positive, unimodal, right‑skewed; mean =k2/(k22)= k_2/(k_2-2) for k22k_2 \geq 2.
  • Order of degrees of freedom matters: F(5,10)F(10,5)F(5,10) \neq F(10,5).
  • As k2k_2 increases, variance decreases and distribution peaks nearer 1.
  • Widely used in ANOVA, regression, and machine learning feature selection.
  • Excel: F.DIST(x, k1, k2, TRUE/FALSE) for cumulative/density; F.INV for critical values.

Descriptive Statistics

Descriptive Statistics: Data Types & Terminology

Descriptive statistics is the process of describing collected data through visuals and numerical summaries. It helps turn raw facts into a story for decision-making.

What is "Statistics"?

The word can mean either:

  • Numerical facts computed from data (e.g., average, median, range).
  • The process of collecting, analysing, presenting, and interpreting data — a blend of science (fixed principles) and art (subtle interpretive nuance).

Statistics is used across business functions: accounting/finance (performance analysis), economics (policy), marketing/production (grow profit, reduce cost), and information systems (system health).

Data and Data Set

  • Data: Facts and figures collected, analysed, and summarised for decision-making.
  • Data set: The entire collection of data for a specific study.

Example: Manjula Nayak's Bengaluru Household Survey
An excerpt with 9 households and multiple variables:

Family SizeLocation (numeric code)Location (text)Ownership (0/1)Income 1 (₹)Income 2 (₹)Monthly Payment (₹)Utilities (₹)Debt (₹)Satisfaction (numeric)Satisfaction (Likert)
32Northwest11,700,000012,0003,00050,0004Satisfied
  • Element: The entity for which data are collected (here: each household).
  • Variable: A characteristic of interest for each element (e.g., family size, location, income).
  • Observation: The complete set of measurements for one element — one entire row.

⚠️ Quiz trap — In a different dataset (Tumkur apartment rents), a table with 7 rows and 10 columns contained 70 elements (households), each with only one variable: monthly rent. Observations were single-cell rents, not whole rows. Never assume rows = observations and columns = variables. Check what each column represents.

Types of Data

Data can be broadly qualitative or quantitative, each with finer subcategories. The type determines how you visualise and analyse it.

flowchart TD
    A[Data] --> B[Qualitative]
    A --> C[Quantitative]
    B --> D[Numeric coding?]
    D -->|Numeric| E[Numeric qualitative]
    D -->|Non-numeric| F[Non-numeric qualitative]
    E --> G{Nature of scale}
    F --> G
    G -->|Labels/names only| H[Nominal]
    G -->|Implied ordering| I[Ordinal]
    C --> J[Numeric/Quantitative]
    J --> K{Scale type}
    K -->|Interval| L[Interval]
    K -->|Ratio| M[Ratio]

Qualitative Data (Categorical)

Records attributes or labels; can be numeric or non-numeric. Divides into:

ScalePropertyExample from survey
NominalLabels/names, no rankingLocation (Southwest=1, Northwest=2, Northeast=3, Southeast=4) — numeric but no order; Ownership (0=rent, 1=own)
OrdinalAll nominal properties plus inherent rankingSatisfaction (5=Extremely satisfied … 1=Extremely dissatisfied) — both non-numeric and numeric forms imply rank

Exam tip: Numbers alone don't make data quantitative. Location codes (1,2,3,4) are still qualitative because they merely label — there is no meaningful ordering.

Quantitative Data (Numerical)

Values have magnitude and order. Two sub-scales:

ScaleMeaningful ratio?Zero meaningful?Examples
Interval❌ No (10°C is not “twice as hot” as 5°C)❌ No (0°C does not mean “no temperature”)Temperature (°C), clock time (2 AM, 4 AM) — intervals matter, not ratios
Ratio✅ Yes (₹2 Lakh profit is twice ₹1 Lakh)✅ Yes (₹0 profit = break-even)Income, debt, age, profit — both ratios and zero are meaningful

Worked comparisons:

  • Ownership (0/1) → qualitative, nominal (no ranking: 1 is not “better” than 0).
  • Satisfaction numeric (1–5) → qualitative, ordinal (5 is better than 1).
  • Income (₹) → quantitative, ratio (₹0 = no income; ₹2L/₹1L = twice).
  • Temperature (Celsius) → quantitative, interval (0°C is arbitrary; 30°C/10°C ≠ "three times hotter").

Key Takeaways

  • Descriptive statistics involves summarising data via visuals and numerical summaries.
  • An observation is the full set of variables for one element, not necessarily one row — always check the data structure.
  • Qualitative data can be numeric or non-numeric; its scale is nominal (no rank) or ordinal (rank implied).
  • Quantitative data is always numeric; its scale is interval (ratio meaningless, zero arbitrary) or ratio (ratio meaningful, zero absolute).
  • The variable type (nominal, ordinal, interval, ratio) determines which visualisation and analysis techniques are appropriate.

Core Classification Framework

Every variable can be classified along three binary axes:

  1. Qualitative (categorical) vs Quantitative (numerical measurement)
  2. Numeric (values are numbers) vs Non‑numeric (labels are text)
  3. Nominal (no order) vs Ordinal (natural order) – for qualitative variables
    Interval (equal intervals, no true zero) vs Ratio (true zero, ratios meaningful) – for quantitative variables

Key insight: A qualitative variable can be numeric (e.g., a 1‑5 rating) – the numbers act as category labels, not measurements. Likewise, a quantitative variable is always numeric.


1. Alumni Survey Data (Jyothi Hegde — IIIT Dharwad)

100+ rows; variables describe student profiles, test scores, and outcomes.

VariableTypeNumeric?Sub‑typeRationale
Gender (M/W)QualitativeNon‑numericNominalLabels only, no order
Age (years)QuantitativeNumericRatioTrue zero (age 0), ratios meaningful
Overall (0‑100)QuantitativeNumericRatioScale includes 0, zero has meaning
Core courses (2‑10 GPA)QuantitativeNumericIntervalScale starts at 2, not 0; ratio not valid
Elective (2‑10 GPA)QuantitativeNumericIntervalSame as core
Work experience (years)QuantitativeNumericRatioTrue zero
Domicile (1=in‑state, 2=out)QualitativeNumericNominalNumbers are codes, no ordering
Rating (1‑5)QualitativeNumericOrdinalNumbers imply rank (5 > 1)
Satisfaction (labels)QualitativeNon‑numericOrdinal“Very satisfied” > “Not at all satisfied”
Salary (lakhs)QuantitativeNumericRatioTrue zero, ratios meaningful

Take‑away for exam:

  • A numeric variable is not automatically quantitative – e.g., rating and domicile are qualitative despite being numbers.
  • Test scores with a non‑zero minimum (e.g., 2‑10) are interval, not ratio, because a score of 4 is not “twice as good” as 2.

2. Credit Card Spending (Hanumanthappa – Canara Bank, Mangaluru)

55 customers; variables: annual income, household size, amount charged.

VariableTypeNumeric?Sub‑type
Annual income (₹ lakhs)QuantitativeNumericRatio
Household size (# persons)QuantitativeNumericRatio
Amount charged (₹/month)QuantitativeNumericRatio

All three are quantitative, numeric, ratio – straightforward.


3. Chroma Customer Survey (Basavaraja – Bellary)

36 responses; includes computer attributes and satisfaction score.

VariableTypeNumeric?Sub‑typeRationale
Brand (e.g., Lenovo, Dell)QualitativeNon‑numericNominalNo order
Price (₹ lakhs)QuantitativeNumericRatioTrue zero
RAM (GB)QualitativeNumericOrdinal32 GB > 16 GB in performance, but not a measurement of “RAM quantity” – it’s a category with order
Hard disk (GB)QualitativeNumericOrdinalSame logic as RAM
Operating system (Win10/11, Home/Pro)QualitativeNon‑numericNominalLater version ≠ better (e.g., Win11 not inherently superior); no clear order
Satisfaction score (0‑100)QuantitativeNumericRatioTrue zero, ratios meaningful

Exam trap: RAM and hard disk are trick variables – they look quantitative but are treated as ordinal categorical because the values are arbitrary tiers, not continuous measurements. Never assume numeric ⇒ quantitative.


4. Nandini Sweets Marketing (Umesh Kamath – Udupi)

Weekly store data; variables: date, store, sales, price, promotions (0/1).

VariableTypeNumeric?Sub‑typeRationale
Date (week)QuantitativeNumericIntervalZero date is arbitrary; ratio of dates meaningless
Store name (text)QualitativeNon‑numericNominalNo order
Units soldQuantitativeNumericRatioTrue zero
Retail price (₹)QuantitativeNumericRatioTrue zero
Coupons (0/1)QualitativeNumericNominal0/1 are codes, no order
Displays (0/1)QualitativeNumericNominalSame
Sampling (0/1)QualitativeNumericNominalSame

Key point: Binary (0/1) variables are qualitative nominal – the numbers are labels, not measurements.


5. Magic Bricks Property Data (Vijay Gowda – Mysuru)

30 apartments; variables: #bathrooms, #bedrooms, premium locality (0/1), gated complex (0/1), amenities (0/1), square footage, selling price.

VariableTypeNumeric?Sub‑type
# bathroomsQuantitativeNumericRatio
# bedroomsQuantitativeNumericRatio
Premium locality (0/1)QualitativeNumericNominal
Gated complex (0/1)QualitativeNumericNominal
Amenities (0/1)QualitativeNumericNominal
Square footageQuantitativeNumericRatio
Selling price (₹)QuantitativeNumericRatio

All quantitative variables are ratio; all qualitative variables are numeric nominal (0/1 codes).


Key Takeaways

  • Qualitative variables classify; they can be numeric (e.g., rating 1‑5) or non‑numeric. Sub‑types: nominal (no order) or ordinal (ranked).
  • Quantitative variables measure; always numeric. Sub‑types: interval (no true zero, e.g., date, test scores starting >0) or ratio (true zero, e.g., income, age, sales).
  • Binary (0/1) variables are qualitative nominal – the numbers are codes, not counts.
  • Numeric does not imply quantitative – always check whether the variable is a measurement or a label.
  • Common exam traps:
    • Test scores with non‑zero minimum → interval (not ratio).
    • RAM/HDD sizes in tiers → ordinal qualitative (not quantitative).
    • Later version of software → not automatically ordinal; judge whether order is meaningful.

Types of Data: Cross-Sectional vs. Time Series

Distinguishing between cross-sectional data and time series data affects how you analyse trends, correlations, and cause‑effect relationships.

  • Cross-sectional data – collected at the same (or approximately the same) point in time across multiple subjects (e.g., households, districts, individuals).
  • Time series data – collected over several time periods for one or more subjects (e.g., months, years).

Key intuition

  • Cross‑sectional: a snapshot across many units at one time.
  • Time series: a movie of one (or several) units across time.

Examples from the transcript

Study / DatasetData collectedClassificationReason
Manjula’s household survey – rent/own, income, monthly paymentAt one point in time across many householdsCross-sectionalSnapshot across households
Jyoti Hegde – placement/satisfaction at IIIT Dharwad (gender, age, exam scores, work experience, salary)Surveyed current people at one time, though they graduated at different timesCross-sectionalSurvey conducted at a single point in time
Hanumanth Pai – credit card data (income, household size, monthly charges)One‑time data on many customersCross-sectionalSnapshot across customers
Basavaraju – customer loyalty at Chroma (computer purchase, brand, price, features)Survey done all at onceCross-sectionalSnapshot across customers
Umesh Kamath – Nandini Sweets (marketing promotions, units sold, selling price, promotion strategy over multiple periods)Data collected over several time periods for stores in Belgaum and GulbargaTime seriesRepeated measurements over time
Vijay Gowda – real estate (bathrooms, bedrooms, locality, amenities, square footage, selling price)Data collected all at onceCross-sectionalSnapshot of flats at one time

Exam tip: The “snapshot across subjects” vs. “repeated measures over time” distinction is often tested. Even if subjects graduated in different years, if you survey them now, it’s cross‑sectional. The key is the time of data collection, not the time period the data describe.


Data Collection Methods

When data are not available from existing sources, they must be collected. Three main approaches:

1. Existing (Secondary) Sources

Data already exist and can be used without separate collection.

  • Examples: Company records (operations, personnel, finances); government data (census); specialized organisations (Bloomberg, Nielsen Company).
  • Advantage: Fast, inexpensive, often large scale.

2. Observational Studies

The researcher observes and records variables of interest without intervening.

  • When to use: When existing sources are insufficient.
  • Process: Simply watch and measure what happens in a real‑world setting.
  • Examples: Observers in a store noting customer choices; HR tracking employee attrition over time.

3. Experimental Studies

Data are collected in a controlled manner – the researcher decides the target group, specific situations/conditions, and what data to collect.

  • When to use: To isolate cause‑and‑effect (often via controlled manipulation).
  • Examples: Clinical trials for pharmaceuticals (target group identified, process specified, predefined data types).

Key contrast: In observational studies you record what naturally occurs; in experimental studies you control conditions to test a hypothesis.


Key takeaways – Types of data

  • Cross‑sectional: one‑time snapshot across subjects → compare differences.
  • Time series: repeated observations over time → track trends and patterns.
  • Classification depends on when the data are collected, not what they describe.

Key takeaways – Data collection

  • Existing sources are the cheapest route, but may lack the variables you need.
  • Observational studies record natural behaviour (no intervention).
  • Experimental studies control conditions to establish causal relationships.

Data Visualization

Data visualization uses tables and graphs to summarize categorical and quantitative data. The goal is not just to create them but to choose the right format for the context and interpret it correctly.

Tabular Summaries for Categorical Data

A frequency distribution is a table that shows the count (frequency) of observations in each of several non‑overlapping categories.

Example: Satisfaction levels (5 levels: Very Satisfied, Satisfied, Neutral, Unsatisfied, Not at all Satisfied) for IIIT Dharwad respondents (103 total: 72 men, 31 women).

Satisfaction LevelMen (freq)Women (freq)Overall (freq)
Very Satisfied17926
Satisfied22426
Neutral22628
Unsatisfied9716
Not at all Satisfied257

A relative frequency is the proportion of observations in a class:

Relative frequency=Frequency of classn\text{Relative frequency} = \frac{\text{Frequency of class}}{n}

The percent frequency is the relative frequency multiplied by 100.

Worked example – Men:

  • Very Satisfied: 17/720.2424%17 / 72 \approx 0.24 \rightarrow 24\%
  • Satisfied: 22/720.3131%22 / 72 \approx 0.31 \rightarrow 31\%
  • Neutral: 22/720.3131%22 / 72 \approx 0.31 \rightarrow 31\%
  • Unsatisfied: 9/720.12512.5%9 / 72 \approx 0.125 \rightarrow 12.5\%
  • Not at all Satisfied: 2/720.0282.8%2 / 72 \approx 0.028 \rightarrow 2.8\%

Women example: Very Satisfied: 9/310.2929%9 / 31 \approx 0.29 \rightarrow 29\%.

A relative frequency distribution and percent frequency distribution are tables of these values.

Graphical Displays for Categorical Data

  • Bar chart – X‑axis: categories; Y‑axis: frequency or percent. Height of bar proportional to count/percent.

  • Pie chart – Circle divided into sectors; sector angle = relative frequency × 360°.

    Example: For men very satisfied (24%): sector angle =0.24×360=86.4= 0.24 \times 360^\circ = 86.4^\circ.

Exam tip: Pie charts are visually harder to compare than bar charts. Most data‑visualisation experts prefer bar charts for categorical data.

Comparing Two Categorical Variables

  • Side‑by‑side bar chart – Two or more bars per category (e.g., men vs. women for each satisfaction level). Orientation can be swapped (categories vs. groups on x‑axis).
  • Stacked bar chart – One bar per category, segmented by the second variable. Height of each segment = frequency.
  • Stacked percentage bar chart – Each bar scaled to 100%; segments show the percentage within each category. Use when absolute counts don’t matter, only proportions.

Choose the format based on the comparison you want to highlight.

Tabular Summaries for Quantitative Data

Frequency, relative frequency, and percent frequency distributions also work for quantitative data, but must define non‑overlapping classes with equal width and 5–10 classes. Each data point falls into exactly one class.

Example – Salary (in ₹ Lakhs) using 7 classes of width 5:

Salary ClassMen (freq)Women (freq)Overall (freq)
15–19.........
20–24.........
25–29.........
30–34.........
35–39.........
40–44.........
45–50.........

Guidelines for class intervals:

  • Same width for all classes.
  • Typically 5–10 classes.
  • Limits chosen so each observation belongs to exactly one class.

Relative frequency and percent frequency are computed the same way as for categorical data.

Graphical Displays for Quantitative Data

  • Histogram – Like a bar chart but rectangles touch (no gap). X‑axis: classes; Y‑axis: frequency. Reveals the shape of the distribution (e.g., skewness).

  • Scatter plot – Shows relationship between two quantitative variables. Each point = one observation (x‑coordinate for one variable, y‑coordinate for the other). A trend line may be added to suggest a pattern.

    Example: Plot salary vs. age for men and women from the survey.

Choosing the Right Display

PurposeRecommended display
Show distribution of a single variable (categorical or quantitative)Bar chart, pie chart (categorical); histogram (quantitative)
Compare two categorical variablesSide‑by‑side bar chart, stacked bar chart, stacked percentage bar chart
Show relationship between two quantitative variablesScatter plot (optionally with trend line)

Data Dashboards

In practice, businesses use data dashboards – a collection of visual displays that organise key metrics for monitoring performance and supporting quick decisions.

Key takeaways

  • Frequency distribution: count per non‑overlapping class; relative frequency = frequency / n; percent = ×100.
  • Bar charts preferred over pie charts for comparing categories.
  • Side‑by‑side and stacked bar charts compare two variables.
  • Histograms (touching rectangles) reveal distribution shape.
  • Scatter plots show relationships between quantitative variables.
  • Class intervals for quantitative data should be equal‑width, 5–10 classes, non‑overlapping.

Measures of Central Tendency

Numerical summaries for data fall into two categories: measures of central tendency (where the data cluster) and measures of dispersion (how spread out they are). Central tendency includes the mean, median, mode, percentiles, and quartiles.

Mean (Arithmetic Average)

The mean is the average value of a variable – the most common measure of central location. For a sample it is denoted xˉ\bar{x} (x‑bar); for a population it is denoted μ\mu. The sample mean is a point estimator of the population mean.

xˉ=1ni=1nxi\bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i

Excel: =AVERAGE(range)

Property: The mean is sensitive to extreme values (outliers). A single very large or very small observation can pull the mean away from the centre.


Median

The median is the middle value when the data are sorted in ascending order.

  • If nn is odd: the median is the (n+1)/2(n+1)/2th observation.
  • If nn is even: the median is the average of the two middle observations.

Robustness: The median is not affected by extreme values.

Example
Dataset: 1, 1, 2, 2, 4 → mean = 2, median = 2.
Change the last value to 394: mean = 80, median = 2. The median remains unchanged.

Because of this, the median is the preferred measure for skewed distributions such as annual income or property prices.

Excel: =MEDIAN(range)


Mode

The mode is the value that occurs with the greatest frequency.

  • Unimodal – exactly one mode.
  • Bimodal – two values tied for highest frequency (e.g., 1,1,2,2,4 has modes 1 and 2).
  • Multimodal – more than two modes; rarely reported because listing many values is unhelpful.

If every value is unique, no mode exists.

Excel:

  • =MODE.SNGL(range) – returns the first most frequent value.
  • =MODE.MULT(range) – returns an array of all modes.
  • If no mode, Excel returns #N/A.

Percentiles

The ppth percentile divides the data so that approximately p%p\% of observations are less than or equal to that value, and (100p)%(100-p)\% are greater.

Computation (the method used by PERCENTILE.EXC):

  1. Sort data in ascending order.
  2. Compute index Lp=p100(n+1)L_p = \frac{p}{100}(n+1)
  3. If LpL_p is an integer, take the LpL_pth observation.
  4. If LpL_p is not an integer, interpolate between the floor and ceiling observations.

Example: 80th percentile with n=200n=200L80=0.8×201=160.8L_{80}=0.8\times201=160.8 → interpolate between the 160th and 161st values.

Excel: =PERCENTILE.EXC(array, k) where k=p/100k = p/100.

Interpretation: A test score at the 80th percentile means about 80% of test‑takers scored lower (and 20% higher).


Quartiles

Quartiles divide the data into four parts, each containing roughly 25% of observations. They are just specific percentiles:

QuartilePercentileAlso known as
Q1 (first quartile)25thLower quartile
Q2 (second quartile)50thMedian
Q3 (third quartile)75thUpper quartile

Excel: Use =PERCENTILE.EXC with k=0.25,0.5,0.75k = 0.25, 0.5, 0.75.


Applied Examples

The following five datasets illustrate how measures of central tendency behave in practice. All values are as reported in the lecture.

1. IIIT Dharwad – salaries of respondents (n=103n=103)

MeasureValue (₹ lakhs)
Mean25.9
Median25
Mode25
Q124
Q2 (median)25
Q327
80th percentile27
90th percentile29

Interpretation: Mean and median are close – no extreme salaries pulling the average.

2. Canara Bank – monthly credit card spend (n=55n=55)

MeasureValue (₹)
Mean3,852
Median3,864
Mode3,657
Q12,890
Q34,531

Mean and median are similar (no extreme spenders), but mode differs – the most common spend amount is lower.

3. Chroma – customer satisfaction score (n=36n=36)

MeasureValue
Mean57.31
Median59
Q153
Q361.75

Median slightly higher than mean; moderate spread.

4. Nandini sweets – weekly sales (n=132n=132)

MeasureValue (₹)
Mean135.98
Median105
Mode91
Q182.25
Q3136.5

Mean (136\approx 136) is much higher than the median (105105) – suggests a few weeks with very high sales (perhaps promotion‑driven) pulling the average up.

5. Jayalakshmipuram – property prices (nn not stated, but data given)

MeasureValue (₹ lakhs)
Mean202.57
Median195
Q1149.5
Q3243.75

Mean > median, indicating some high‑priced properties inflating the average – a common pattern in real estate.

Exam tip: The median is the better measure of “typical” value when data are skewed or contain outliers (e.g., income, house prices). Always check whether mean and median are close – if not, the mean is likely distorted.

Key takeaways

  • Mean = sum ÷ nn, sensitive to outliers; median = middle value, robust; mode = most frequent.
  • Percentiles and quartiles describe the distribution’s spread. Q2 = median.
  • Excel commands: AVERAGE, MEDIAN, MODE.SNGL/MODE.MULT, PERCENTILE.EXC.
  • When mean and median differ substantially, suspect extreme values in the tail.

Measures of Dispersion

Measures of dispersion (or variability) quantify how spread out a dataset is.
Intuition: two datasets can have the same mean but very different spreads — think of salaries clustered around ₹25 L vs. salaries scattered from ₹10 L to ₹50 L.

Range

The range is the simplest measure: the difference between the largest and smallest values.

Range=max(xi)min(xi)\text{Range} = \max(x_i) - \min(x_i)

  • In Excel: =MAX(data) - MIN(data).
  • Limitation: based on only two observations → highly sensitive to extreme values. Rarely used alone.

Interquartile Range (IQR)

The interquartile range (IQR) overcomes the range’s dependency on extremes. It is the range of the middle 50% of the data:

IQR=Q3Q1\text{IQR} = Q_3 - Q_1

  • Q1Q_1 = 25th percentile, Q3Q_3 = 75th percentile.
  • Not affected by outliers.

Variance

The sample variance uses all data points. It is the average of the squared deviations from the mean.

For nn observations x1,x2,,xnx_1, x_2, \dots, x_n with sample mean xˉ\bar{x}:

  1. Compute each deviation: xixˉx_i - \bar{x}
  2. Square each deviation: (xixˉ)2(x_i - \bar{x})^2
  3. Sum all squared deviations: (xixˉ)2\sum (x_i - \bar{x})^2
  4. Divide by n1n-1 (not nn) — a correction that makes the sample variance an unbiased estimator of the population variance.

s2=i=1n(xixˉ)2n1s^2 = \frac{\sum_{i=1}^n (x_i - \bar{x})^2}{n-1}

The sum of deviations (xixˉ)\sum (x_i - \bar{x}) always equals zero — a direct consequence of the definition of the mean.

Exam tip: Dividing by n1n-1 (instead of nn) makes little difference when nn is large, but it is essential for correct statistical inference.

Worked example — dataset: 1, 1, 2, 2, 4

  • xˉ=2\bar{x} = 2
  • Deviations: 1,1,0,0,2-1, -1, 0, 0, 2 → squared: 1,1,0,0,41, 1, 0, 0, 4 → sum = 6
  • s2=651=1.5s^2 = \frac{6}{5-1} = 1.5

In Excel: =VAR.S(data).

Standard Deviation

The standard deviation is the square root of the variance. It is measured in the same units as the original data, making it more interpretable.

s=s2s = \sqrt{s^2}

For the above example: s=1.51.22s = \sqrt{1.5} \approx 1.22.

In Excel: =STDEV.S(data).

Coefficient of Variation (CV)

The coefficient of variation is a relative measure of dispersion: standard deviation divided by the mean, expressed as a percentage.

CV=sxˉ×100%\text{CV} = \frac{s}{\bar{x}} \times 100\%

  • Useful for comparing variability across datasets with different units or means.
  • Larger CV → greater relative spread.

Summary of Measures: Five Example Datasets

Dataset (Variable)MeanMedianMinMaxRangessCVIQR
Jyothi – Salary (₹ L)25.92251850323.6614%3
Hanumantha – Monthly spend (₹)3,8523,8641,45438%1,641
Basavaraja – Satisfaction score57.314266246.3811%8.75
Umesh – Weekly sales (units)135.981053443239888.3665%54.25
Vijay – Property price (₹ L)202195554113569346%94.25

Key takeaways

  • Range is simple but fragile; IQR is robust to outliers.
  • Variance and standard deviation use all data; standard deviation is in original units.
  • Coefficient of variation normalises spread by the mean — ideal for comparisons.
  • All these measures are point estimates of the corresponding population parameters.

Z‑Scores (Standardized Scores)

A Z‑score tells how many standard deviations a data point lies above or below the mean. It standardises any variable to a common scale.

zi=xixˉsz_i = \frac{x_i - \bar{x}}{s}

  • Positive zz: observation above the mean; negative zz: below the mean.
  • Dimensionless → can compare variables with different units (e.g., household size vs. property price).

Properties of Z‑scores

  • The set of ziz_i for any dataset always has mean = 0 and standard deviation = 1.
  • Why? Subtracting the mean shifts the centre to zero; dividing by the standard deviation scales the spread to 1.

In Excel: =STANDARDIZE(x, mean, sd).

Detecting Outliers with Z‑Scores

A common rule: data points with |zz| > 3 are considered outliers (more than 3 standard deviations from the mean).

Example — Jyothi’s salary data (xˉ=25.92\bar{x}=25.92, s=3.66s=3.66):

  • Minimum z=2.17z = -2.17 (salary ₹18 L)
  • Maximum z=+6.58z = +6.58 (salary ₹50 L)
  • Two points with z>3z > 3: salaries ₹38 L (z=3.3z=3.3) and ₹50 L (z=6.58z=6.58) → flagged as outliers by the zz-score method.

Key takeaways

  • Z‑score standardises any variable to mean 0, SD 1.
  • z>3|z| > 3 is a common outlier threshold.
  • Z‑scores enable cross-variable comparisons.

Five‑Number Summary and Box Plot

The five‑number summary captures the distribution’s centre, spread, and extremes:

  1. Smallest value
  2. First quartile Q1Q_1 (25th percentile)
  3. Median Q2Q_2
  4. Third quartile Q3Q_3 (75th percentile)
  5. Largest value

A box‑and‑whisker plot (box plot) visualises this summary.

Construction Rules

  • Box: ends at Q1Q_1 and Q3Q_3; a line inside marks the median.
  • Interquartile range: IQR=Q3Q1\text{IQR} = Q_3 - Q_1
  • Fences:
    • Lower fence: Q11.5×IQRQ_1 - 1.5 \times \text{IQR}
    • Upper fence: Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}
  • Whiskers: extend from the box to the smallest and largest data points that lie inside the fences.
  • Outliers: any data point outside the fences is plotted as a small circle.

Exam tip: The 1.5×IQR rule and the z>3|z|>3 rule can identify different outliers. No single method is definitive; use both when exploring data.

Example — Jyothi’s Salary Data

  • Q1=24Q_1 = 24, Q3=27Q_3 = 27, median = 25, IQR=3\text{IQR}=3
  • Lower fence: 241.5×3=19.524 - 1.5\times3 = 19.5
  • Upper fence: 27+1.5×3=31.527 + 1.5\times3 = 31.5
  • Whiskers: lower whisker ends at 21 (the smallest salary ≥ 19.5); upper whisker ends at 31 (the largest salary ≤ 31.5).
  • Outliers (outside fences): ₹18 L (below lower fence), ₹32 L, ₹35 L, ₹38 L, ₹50 L (above upper fence).

Note: The zz-score method flagged only ₹38 L and ₹50 L; the box plot additionally flags ₹18 L, ₹32 L, ₹35 L.

In Excel: box plots can be created from the charting options (histogram group).

flowchart LR
  A[Five-number summary] --> B[Draw box Q1 to Q3]
  B --> C[Add median line]
  B --> D[Compute fences ±1.5×IQR]
  D --> E[Whiskers to nearest data inside fences]
  D --> F[Plot outside points as outliers]

Key takeaways

  • Five‑number summary gives a compact description of shape, spread, and outliers.
  • Box plot uses the 1.5×IQR rule to identify outliers.
  • Compare box‑plot outliers with zz-score outliers for a fuller picture.
  • “A picture is worth a thousand words” — box plots are excellent exploratory tools.

Using the Analysis ToolPak for Descriptive Statistics

Excel’s built-in statistical functions compute one statistic at a time (e.g., =AVERAGE, =VAR.S). The Analysis ToolPak provides a Descriptive Statistics tool that calculates multiple summary measures simultaneously for one or more variables.

Activation and Use

  1. Enable ToolPak: File → Options → Add-Ins → Manage Excel Add-Ins → Analysis Toolpak → OK.
  2. Run tool: Data → Data Analysis → Descriptive Statistics.
  3. Specify inputs: select input range (e.g., C1:I104), check Summary statistics, choose output range.
  4. Output includes: mean, median, mode, variance, standard deviation, range, minimum, maximum, count, kurtosis, skewness, and more — all in one table.

Recap of Descriptive Statistics Covered

The module previously covered:

  • Measures of central tendency: mean, median, mode, percentiles, quartiles.
  • Measures of dispersion: range, interquartile range (IQR), variance, standard deviation, coefficient of variation.
  • Five-number summary and box‑and‑whisker plot.
  • Outlier detection: using z‑score (e.g., |z| > 3) and the box plot (points beyond 1.5×IQR).

Key takeaways – Analysis ToolPak

  • The ToolPak’s Descriptive Statistics tool computes all common summary statistics at once.
  • Activate via File → Options → Add-Ins → Analysis Toolpak.
  • Use the tool from Data → Data Analysis for any selected data range.
  • Output includes both central tendency and dispersion measures automatically.

Basic Concepts of Probability

Probability is a numerical measure of the likelihood of an event, on a scale from 0 (impossible) to 1 (certain). A probability of 0.5 means the event is as likely as not.

Definitions and Notation

  • Random experiment: a process with more than one possible outcome.
  • Sample space (SS): the set of all possible outcomes (each outcome is a sample point).
  • Event: any subset of the sample space.
  • Complement of event AA (AcA^c): all sample points not in AA.
    P(Ac)=1P(A)P(A^c) = 1 - P(A)

Example: Movie Revenue

Sanchita Shenoy runs PVR Cinemas’ special re-runs of KGF Chapter 2 and Kantara.

  • KGF revenue can be {3, 4, 5, 6} lakhs.
  • Kantara revenue can be {4, 5, 6} lakhs.
  • A movie is a hit if revenue ≥ 5 lakhs.

The sample space contains 12 outcomes (3×4 combinations). Probabilities are obtained from historical data:

OutcomeKGF (₹ lakhs)Kantara (₹ lakhs)Probability (from data)
134(not given)
2350.10
3360.10
444(not given)
545(not given)
646(not given)
7540.10
8550.08
9560.02
1064(not given)
11650.06
12660.02

(Only probabilities mentioned in the lecture are shown; the sum of all 12 probabilities equals 1.)

Define events:

  • AA: KGF is a hit (revenue 5 or 6 lakhs) → outcomes 7–12.
    P(A)=0.10+0.08+0.02+(others)=0.34P(A) = 0.10 + 0.08 + 0.02 + (\text{others}) = 0.34
  • BB: Kantara is a hit (revenue 5 or 6 lakhs) → outcomes 2,3,5,6,8,9,11,12.
    P(B)=0.10+0.10+=0.60P(B) = 0.10 + 0.10 + \dots = 0.60

Complements:

  • P(Ac)=10.34=0.66P(A^c) = 1 - 0.34 = 0.66 (KGF not a hit).
  • P(Bc)=10.60=0.40P(B^c) = 1 - 0.60 = 0.40 (Kantara not a hit).

Union and Intersection

  • Union (ABA \cup B): event containing all sample points in AA, BB, or both.
    Intuition: at least one movie is a hit.
  • Intersection (ABA \cap B): event containing sample points in both AA and BB.
    Intuition: both movies are hits.

For the example:

  • Outcomes in ABA \cup B = {2,3,5,6,7,8,9,10,11,12} (all outcomes except those where neither is a hit).
    P(AB)=0.76P(A \cup B) = 0.76
  • Outcomes in ABA \cap B = {8,9,11,12} (both hits).
    P(AB)=0.08+0.02+0.06+0.02=0.18P(A \cap B) = 0.08 + 0.02 + 0.06 + 0.02 = 0.18

Addition Law

The addition law gives the probability of the union of two events:

P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B)

Verification with the movie example: 0.34+0.600.18=0.76(matches)0.34 + 0.60 - 0.18 = 0.76 \quad \text{(matches)}

Exam tip: The subtraction of P(AB)P(A \cap B) corrects for double‑counting the overlap. Forgetting this is a common mistake.

Mutually Exclusive Events

Two events are mutually exclusive (disjoint) if they have no sample points in commonAB=A \cap B = \varnothing.
Then P(AB)=0P(A \cap B) = 0, and the addition law simplifies to:

P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

Example: A single coin toss — events “heads” and “tails” are mutually exclusive.

In Venn diagram terms, mutually exclusive events are non‑overlapping circles.

Key takeaways – Probability Basics

  • Probability ranges from 0 to 1; P(S)=1P(S) = 1.
  • Complement: P(Ac)=1P(A)P(A^c) = 1 - P(A).
  • Union probability includes all outcomes in either event; intersection probability includes only common outcomes.
  • Addition law: P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B).
  • For mutually exclusive events, P(AB)=0P(A \cap B) = 0 so P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B).

Bayes’ Theorem

Bayes’ Theorem links prior probability (initial belief about an event) to posterior probability (updated belief after observing new evidence). Intuitively: when you learn that event BB has occurred, your estimate of the probability of event AA may change. Bayes’ Theorem quantifies exactly how.

Conditional Probability

The probability of AA given that BB has occurred is conditional probability:

P(AB)=P(AB)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}

Similarly,

P(BA)=P(AB)P(A)P(B \mid A) = \frac{P(A \cap B)}{P(A)}

Multiplication Law

The multiplication law expresses the intersection probability in two equivalent ways:

P(AB)=P(AB)P(B)=P(BA)P(A)P(A \cap B) = P(A \mid B) \, P(B) = P(B \mid A) \, P(A)

These relations are the building blocks of Bayes’ Theorem.

Relating Prior and Posterior

Given a prior P(A)P(A) and new information BB, the posterior P(AB)P(A \mid B) is:

P(AB)=P(BA)P(A)P(B)P(A \mid B) = \frac{P(B \mid A) \, P(A)}{P(B)}

Interpretation: The posterior is proportional to the likelihood of the evidence given AA times the prior, normalized by the total probability of BB.

Worked Example (Movie Hits)

  • AA = movie KGF is a hit, prior P(A)=0.34P(A)=0.34
  • BB = movie Kantara is a hit, P(B)=0.60P(B)=0.60
  • Joint P(AB)=0.18P(A \cap B)=0.18

Compute posterior P(AB)P(A \mid B):

P(AB)=0.180.60=0.30P(A \mid B) = \frac{0.18}{0.60} = 0.30

The posterior (0.30) is lower than the prior (0.34) – knowing Kantara was a hit reduced the chance of KGF being a hit.

Compute P(BA)P(B \mid A):

P(BA)=0.180.340.53P(B \mid A) = \frac{0.18}{0.34} \approx 0.53

Again, the posterior (0.53) is lower than the prior of BB (0.60).

Joint Probability Table

A joint probability table arranges all intersection probabilities for quick computation of conditionals and marginals.

BB (Kantara hit)BcB^c (not hit)Marginal
AA (KGF hit)0.180.160.34
AcA^c (not hit)0.420.240.66
Marginal0.600.401.00
  • Marginal probabilities are in the last row/column (e.g., P(A)=0.34P(A)=0.34, P(B)=0.60P(B)=0.60).
  • To find P(BA)P(B \mid A), divide the joint in row AA (0.18) by the row marginal (0.34).

Exam tip: Always check whether you are conditioning on a row or a column. The denominator is always the marginal of the conditioning event.

Independence of Events

Two events AA and BB are independent if the occurrence of one does not affect the probability of the other:

P(AB)=P(A)orP(BA)=P(B)P(A \mid B) = P(A) \quad \text{or} \quad P(B \mid A) = P(B)

Equivalently:

P(AB)=P(A)P(B)P(A \cap B) = P(A) \, P(B)

Mutually exclusive events with non-zero probability cannot be independent (if one happens, the other cannot, so P(AB)=0P(A)P(A \mid B)=0 \neq P(A)).

  • In the movie example: P(AB)=0.18P(A \cap B)=0.18, P(A)P(B)=0.34×0.60=0.204P(A)P(B)=0.34 \times 0.60=0.204. Since 0.180.2040.18 \neq 0.204, the events are not independent.

Law of Total Probability

The law of total probability expresses the total probability of AA as a sum over mutually exclusive and collectively exhaustive events:

P(A)=P(AB)+P(ABc)P(A) = P(A \cap B) + P(A \cap B^c)

Generalized to nn events B1,B2,,BnB_1, B_2, \dots, B_n that partition the sample space:

P(A)=i=1nP(ABi)=i=1nP(ABi)P(Bi)P(A) = \sum_{i=1}^{n} P(A \cap B_i) = \sum_{i=1}^{n} P(A \mid B_i) \, P(B_i)

Example: For movie KGF being a hit, consider three revenue outcomes for Kantara (B1B_1=₹4 lakhs, B2B_2=₹5 lakhs, B3B_3=₹6 lakhs). Then P(A)=P(AB1)+P(AB2)+P(AB3)=0.34P(A) = P(A \cap B_1) + P(A \cap B_2) + P(A \cap B_3) = 0.34.

Worked Example: Jyothi Hegde’s Placement Data

Categorize respondents by work experience (WW: ≤2 years or >2 years) and salary (SS: ≤₹25 lakhs or >₹25 lakhs). Total n=103n=103.

S25S \leq 25S>25S > 25Row total
W2W \leq 2341347
W>2W > 2223456
Column total5647103

Convert to probabilities (divide by 103):

S25S \leq 25S>25S > 25Marginal
W2W \leq 20.3300.1260.456
W>2W > 20.2140.3300.544
Marginal0.5440.4561.000

Compute probabilities:

  • P(W>2)=56/1030.544P(W > 2) = 56/103 \approx 0.544
  • P(S>25)=47/1030.456P(S > 25) = 47/103 \approx 0.456
  • P(W2S>25)=13/1030.126P(W \leq 2 \cap S > 25) = 13/103 \approx 0.126
  • P(W>2S>25)=34/470.723P(W > 2 \mid S > 25) = 34/47 \approx 0.723
  • P(S>25W>2)=34/560.607P(S > 25 \mid W > 2) = 34/56 \approx 0.607

Key takeaways

  • Priorposterior: update probability when new information arrives.
  • Conditional probability: P(AB)=P(AB)/P(B)P(A \mid B) = P(A \cap B)/P(B).
  • Bayes’ Theorem: P(AB)=P(BA)P(A)/P(B)P(A \mid B) = P(B \mid A)P(A)/P(B).
  • Use a joint probability table to organize and compute conditionals and marginals.
  • Independence is tested via P(AB)=P(A)P(B)P(A \cap B)=P(A)P(B); mutually exclusive events are dependent.
  • Law of total probability sums over partitions to find P(A)P(A).

Multiple Linear Regression - I

Multiple Linear Regression - I

Multiple linear regression (MLR) extends simple linear regression to model a single dependent variable yy using two or more independent variables x1,x2,,xpx_1, x_2, \dots, x_p. The intuition: real-world outcomes rarely depend on just one factor. By including more relevant predictors, MLR typically yields better predictions than simple regression.

The MLR Model

The multiple regression model describes how yy relates to the independent variables plus a random error term:

y=β0+β1x1+β2x2++βpxp+ϵy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_p x_p + \epsilon

where:

  • β0,β1,,βp\beta_0, \beta_1, \dots, \beta_p are parameters (unknown population coefficients).
  • ϵ\epsilon is the error term – a random variable that captures variability in yy not explained by the linear combination of the xx's.
  • pp denotes the number of independent variables.

Key assumption

The expected value of the error term is zero: E(ϵ)=0E(\epsilon) = 0. Consequently, the mean or expected value of yy is:

E(y)=β0+β1x1+β2x2++βpxpE(y) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_p x_p

This equation is called the multiple regression equation. If the parameters were known, we could compute E(y)E(y) for any given values of x1,,xpx_1, \dots, x_p.

Estimated regression equation

In practice, parameters are unknown. Using a sample (training data), we obtain point estimators b0,b1,,bpb_0, b_1, \dots, b_p for β0,β1,,βp\beta_0, \beta_1, \dots, \beta_p. The estimated multiple regression equation is:

y^=b0+b1x1+b2x2++bpxp\hat{y} = b_0 + b_1 x_1 + b_2 x_2 + \dots + b_p x_p

y^\hat{y} is the predicted value of the dependent variable.

Exam tip: The structure of MLR is a direct generalization of simple linear regression. Expect to see the same core concepts (estimators, residuals, hypothesis tests) extended to multiple predictors.

Key takeaways – MLR model

  • pp = number of independent variables.
  • Model: y=β0+β1x1++βpxp+ϵy = \beta_0 + \beta_1 x_1 + \dots + \beta_p x_p + \epsilon with E(ϵ)=0E(\epsilon)=0.
  • Regression equation: E(y)=β0+β1x1++βpxpE(y) = \beta_0 + \beta_1 x_1 + \dots + \beta_p x_p.
  • Estimated equation: y^=b0+b1x1++bpxp\hat{y} = b_0 + b_1 x_1 + \dots + b_p x_p, where bb's are sample estimates.

Steps for Developing an MLR Model

Model building is an iterative process; many steps may need revisiting. The following ten steps are typical:

flowchart TD
    A[1. Collect data] --> B[2. Preprocess data]
    B --> C[3. Descriptive analytics]
    C --> D[4. Decide modeling strategy]
    D --> E[5. Split data: training & validation]
    E --> F[6. Define functional form]
    F --> G[7. Estimate parameters using OLS]
    G --> H[8. Model diagnostics]
    H --> I{Validation pass?}
    I -->|No| D
    I -->|Yes| J[9. Validate on hold-out data]
    J --> K[10. Deploy model]
    K --> L[Monitor & iterate]
  1. Collect data – Identify relevant independent variables and gather data from secondary sources (e.g., ERP systems, databases, government census) or primary sources (surveys, interviews).

  2. Preprocess data – Assess completeness and correctness. Handle missing observations and transform qualitative/categorical variables (e.g., through dummy coding).

  3. Descriptive analytics – Compute basic statistics and use visualizations (scatter plots, box plots) to examine correlations, flag potential multicollinearity and overfitting. Identify proxy variables if original variables cannot be used (ethical or regulatory reasons).

  4. Modeling strategy – Select the set of independent variables. Desirable properties:

    • Variables should be independent of each other.
    • Model performance should be consistent across training and test data.
    • Variables should be controllable by the decision maker (e.g., price is controllable; weather is not). A model with uncontrollable variables may be less actionable.
  5. Split data – Divide into training and validation sets. Multiple subsets can be used for cross-validation.

  6. Define functional form – Start with a linear relationship between yy and the xx's. Nonlinear transformations (e.g., x2x^2) are allowed and do not make the regression non‑linear in parameters – they are still estimated with OLS.

  7. Estimate parameters – Use ordinary least squares (OLS) to find b0,b1,,bpb_0, b_1, \dots, b_p that minimize the sum of squared residuals. OLS provides the Best Linear Unbiased Estimator (BLUE) under standard assumptions.

  8. Model diagnostics – Check statistical significance:

    • F‑test – tests overall model significance (whether all coefficients except β0\beta_0 are jointly zero).
    • t‑test – tests significance of individual coefficients. Additional diagnostics for MLR include checking normality of residuals, multicollinearity, and heteroscedasticity. If assumptions are violated, take remedial measures.
  9. Validate model – Use the validation data to assess performance. Common metrics:

    • R2R^2 (coefficient of determination)
    • Adjusted R2R^2 (penalizes for number of predictors)
    • Mean absolute percentage error (MAPE)
    • Root mean square error (RMSE) Models with low bias and low variance on both training and validation sets are preferred.
  10. Deploy model – Generate actionable insights and create an implementation plan. Continuously monitor performance; models may need to be updated over time.

Exam tip: The F‑test and t‑test in MLR serve the same roles as in simple regression, but now the F‑test checks the entire set of predictors simultaneously. Multicollinearity is a new issue unique to MLR – watch for high correlation among independent variables.

Key takeaways – model development

  • MLR development is iterative; steps are often repeated.
  • Data quality, preprocessing, and descriptive analytics are critical.
  • OLS yields BLUE estimates.
  • Diagnostics include F‑test (overall), t‑tests (individual), normality, multicollinearity, heteroscedasticity.
  • Validation uses R2R^2, adjusted R2R^2, MAPE, RMSE; aim for consistent performance.
  • Deployment requires ongoing monitoring.

OLS in Multiple Linear Regression

Ordinary Least Squares (OLS) extends from simple regression to the multiple regression setting. The principle is identical: minimize the sum of squared deviations between observed and predicted values of the dependent variable.

Minimization criterion

Minimize i=1n(yiy^i)2\text{Minimize } \sum_{i=1}^{n} (y_i - \hat{y}_i)^2

  • yiy_i = observed value of the dependent variable for observation ii
  • y^i\hat{y}_i = predicted value from the estimated multiple regression equation

Estimated regression equation

y^=b0+b1x1+b2x2++bpxp\hat{y} = b_0 + b_1 x_1 + b_2 x_2 + \dots + b_p x_p

The coefficients b0,b1,,bpb_0, b_1, \dots, b_p are obtained by applying OLS to sample data. In simple regression closed-form formulas exist; in multiple linear regression (MLR) the solution uses matrix algebra (covered via software). Interpretation of output is the primary focus.

Interpreting coefficients in MLR vs. simple regression

In simple regression, b1b_1 is the estimated change in yy for a one‑unit change in xx. In MLR, the interpretation becomes conditional:

bib_i represents the estimated change in yy corresponding to a one‑unit change in xix_i when all other independent variables are held constant.

Worked example: Hanumantha’s credit card data

  • n=55n = 55 observations
  • yy = monthly credit card spend ()
  • x1x_1 = annual household income (₹ lakh)
  • x2x_2 = household size (persons)

Simple regression with only income: y^=1047.37+85.27x1\hat{y} = 1047.37 + 85.27 x_1

  • F=98.24F = 98.24, p0p \approx 0 → significant
  • R2=0.65R^2 = 0.65

Simple regression with only household size: y^=2083.67+520.13x2\hat{y} = 2083.67 + 520.13 x_2

  • F=34.76F = 34.76, p0p \approx 0 → significant
  • R2=0.39R^2 = 0.39

Multiple regression with both predictors: y^=355.68+71.16x1+339.9x2\hat{y} = 355.68 + 71.16 x_1 + 339.9 x_2

  • R2=0.80R^2 = 0.80

Notice that b1b_1 dropped from 85.2785.27 (simple) to 71.1671.16 (MLR) because the effect of income is now estimated holding household size fixed.

CoefficientSimple (only income)MLR (income + size)Interpretation in MLR
b1b_1 (income)85.2785.2771.1671.16For a ₹1 lakh increase in income, monthly spend increases by ₹71.16, assuming household size remains constant.
b2b_2 (size)520.13520.13339.90339.90For an increase of one person in household size, monthly spend increases by ₹339.90, assuming income remains constant.

Exam tip: The conditional interpretation (“holding other variables constant”) is the key distinction between simple and multiple regression coefficients. Always phrase it explicitly.

Key takeaways – OLS in MLR

  • OLS minimises (yiy^i)2\sum (y_i - \hat{y}_i)^2, whether for one or many predictors.
  • Coefficients are computed via matrix algebra; focus on interpretation of software output.
  • In MLR, bib_i measures the change in yy per unit change in xix_i with all other xx’s held constant.
  • Adding a relevant predictor can change the magnitude (and sometimes sign) of existing coefficients – do not expect them to stay the same.

Multiple Coefficient of Determination

The multiple coefficient of determination R2R^2 measures the overall fit of the estimated regression equation.

Sum of squares decomposition

SST=SSR+SSESST = SSR + SSE

TermDefinitionFormula
SSTSSTTotal sum of squares (total variability in yy)(yiyˉ)2\sum (y_i - \bar{y})^2
SSRSSRSum of squares due to regression (explained variability)(y^iyˉ)2\sum (\hat{y}_i - \bar{y})^2
SSESSESum of squares due to error (unexplained variability)(yiy^i)2\sum (y_i - \hat{y}_i)^2

SSTSST depends only on yy, not on the model. Adding predictors typically increases SSRSSR and decreases SSESSE, improving fit.

R2R^2 in simple vs. multiple regression

R2=SSRSSTR^2 = \frac{SSR}{SST}

Interpretation: proportion of the variability in yy explained by the estimated regression equation (multiply by 100 for percentage).

Hanumantha’s example – R2R^2 comparison:

ModelSSRSSRSSESSESSTSSTR2R^2
Simple (income only)74,180,51640,017,408114,197,9230.65 (65%)
MLR (income + size)91,468,85222,729,070114,197,9230.80 (80%)

R2R^2 increased from 0.65 to 0.80 – the two predictors together explain 80% of the variation in monthly spend.

Why R2R^2 always increases (or stays the same) with more predictors

Adding an independent variable cannot worsen the fit because OLS can always set its coefficient to zero, leaving R2R^2 unchanged. In practice, R2R^2 almost always increases.

Adjusted R2R^2 – penalizing for extra variables

The adjusted R2R^2 modifies R2R^2 to account for the number of predictors, preventing overestimation of explanatory power.

Adjusted R2=1(1R2)n1np1\text{Adjusted } R^2 = 1 - (1 - R^2)\frac{n-1}{n-p-1}

  • nn = number of observations
  • pp = number of independent variables

If pp is large relative to nn, the adjusted R2R^2 can become negative – in that case set it to 0.

Hanumantha’s example – adjusted R2R^2:

  • Simple regression (p=1): 1(10.65)551552=10.35×54530.641 - (1 - 0.65)\frac{55-1}{55-2} = 1 - 0.35 \times \frac{54}{53} \approx 0.64
  • MLR (p=2): 1(10.80)551553=10.20×54520.7931 - (1 - 0.80)\frac{55-1}{55-3} = 1 - 0.20 \times \frac{54}{52} \approx 0.793

The adjusted R2R^2 (0.793) is only slightly lower than R2R^2 (0.80), suggesting the extra variable is genuinely useful.

Exam tip: R2R^2 alone can mislead – always report adjusted R2R^2 when comparing models with different numbers of predictors.

Key takeaways – Multiple coefficient of determination

  • R2=SSR/SSTR^2 = SSR/SST; it is the proportion of yy‑variation explained by the model.
  • SSTSST is unaffected by the model; adding predictors increases SSRSSR and decreases SSESSE, pushing R2R^2 upward.
  • Adjusted R2R^2 penalises for adding useless predictors; use it to avoid overfitting.
  • Formula: Adj R2=1(1R2)n1np1\text{Adj }R^2 = 1 - (1-R^2)\frac{n-1}{n-p-1} (set to 0 if negative).

Test of Significance in Multiple Linear Regression

Before using an estimated multiple regression equation for decision making, we must test whether the assumed linear relationship is statistically significant. This requires two types of tests: an F-test for overall significance and t-tests for individual significance.

Assumptions for Inference

All hypothesis tests rest on four assumptions about the error term ε\varepsilon (identical to simple linear regression):

  • Mean zero: E(ε)=0E(\varepsilon) = 0 for all combinations of x1,x2,,xpx_1, x_2, \dots, x_p.
    Hence E(y)=β0+β1x1+β2x2++βpxpE(y) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_p x_p.
  • Constant variance: Var(ε)=σ2\text{Var}(\varepsilon) = \sigma^2 for all xx values.
  • Independence: The error terms (and therefore the yy values) for different observations are independent.
  • Normality: εN(0,σ2)\varepsilon \sim N(0,\sigma^2) for all xx values. Since yy is a linear function of ε\varepsilon, yy is also normally distributed.

These assumptions are often satisfied in practice but should be checked before relying on the model.

Overall Significance: The F-Test

The F-test asks: Does the entire set of independent variables collectively explain a significant portion of the variation in yy?

  • Hypotheses
    H0:β1=β2==βp=0H_0: \beta_1 = \beta_2 = \dots = \beta_p = 0
    Ha:At least one βi0H_a: \text{At least one } \beta_i \neq 0

  • Mean squares
    Recall that a mean square is a sum of squares divided by its degrees of freedom.

    SourceSum of SquaresdfMean Square
    RegressionSSRppMSR=SSRp\displaystyle \text{MSR} = \frac{\text{SSR}}{p}
    ErrorSSEnp1n-p-1MSE=SSEnp1\displaystyle \text{MSE} = \frac{\text{SSE}}{n-p-1}
    TotalSSTn1n-1

    MSE is an unbiased estimator of σ2\sigma^2. Under H0H_0, MSR also estimates σ2\sigma^2; their ratio should be near 1.
    Under HaH_a, MSR overestimates σ2\sigma^2, so the ratio becomes larger.

  • Test statistic
    F=MSRMSEF(p,np1) under H0F = \frac{\text{MSR}}{\text{MSE}} \quad\sim\quad F(p,\, n-p-1) \text{ under }H_0

  • Decision rule
    Reject H0H_0 if p-valueα\text{p-value} \le \alpha.

Worked Example: Hanumantha’s Data

Hanumantha models monthly credit card spend (yy) using annual income (x1x_1) and household size (x2x_2); p=2p = 2. The ANOVA output gives:

  • SSR=91,468,852\text{SSR} = 91,468,852, df =2=2MSR=45,734,426\text{MSR} = 45,734,426
  • SSE=22,729,071\text{SSE} = 22,729,071, df =52=52MSE=437,098\text{MSE} = 437,098
  • F=45,734,426437,098=104.63F = \frac{45,734,426}{437,098} = 104.63
  • p-value0\text{p-value} \approx 0 (at α=0.05\alpha = 0.05)

Reject H0H_0: there is a significant overall linear relationship between monthly spend and the two predictors.

Exam tip: The square root of MSE is the standard error of estimate, s=MSE=661.13s = \sqrt{\text{MSE}} = 661.13 — the estimated standard deviation of the error term. It is often reported in regression output.

Individual Significance: The t-Test

Once the F-test confirms overall significance, we test each coefficient separately to see which predictors matter individually.

  • Hypotheses (for a given βi\beta_i)
    H0:βi=0Ha:βi0H_0: \beta_i = 0 \qquad H_a: \beta_i \neq 0

  • Test statistic
    t=bis(bi)t(np1) under H0t = \frac{b_i}{s(b_i)} \quad\sim\quad t(n-p-1) \text{ under }H_0
    where bib_i is the estimated coefficient and s(bi)s(b_i) its standard error.

  • Decision rule
    Reject H0H_0 if p-valueα\text{p-value} \le \alpha. Rejection indicates that xix_i contributes significantly to explaining yy after accounting for the other predictors.

Worked Example: Hanumantha’s Data (continued)

The regression output provides:

PredictorCoefficient bib_iStd. Error s(bi)s(b_i)tt statisticp-value
Annual Income (x1x_1)71.176.9271.176.92=10.28\frac{71.17}{6.92}=10.28≈ 0
Household Size (x2x_2)339.9254.05339.9254.05=6.29\frac{339.92}{54.05}=6.29≈ 0

Both p-values are essentially zero → reject both null hypotheses.
Conclusion: Both annual income and household size have a statistically significant individual relationship with monthly credit card spend.

Putting It All Together: Testing Workflow

flowchart LR
  A[Estimate MLR model] --> B[F-test: overall significance]
  B -- "Reject H₀" --> C[At least one predictor is associated with y]
  B -- "Fail to reject H₀" --> D[Model not useful; stop]
  C --> E[t-tests for each βᵢ]
  E -- "Reject H₀ for βᵢ" --> F["xᵢ is significant (individually)"]
  E -- "Fail to reject" --> G["xᵢ is not significant"]

In simple linear regression the F-test and t-test give identical conclusions. In multiple regression they have distinct roles: F tests the whole set; t tests isolate individual contributions.

Key Takeaways

  • Assumptions about ε\varepsilon (mean 0, constant variance, independence, normality) are required for inference.
  • The F-test for overall significance evaluates H0:β1==βp=0H_0: \beta_1=\cdots=\beta_p=0 using F=MSR/MSEF = \text{MSR}/\text{MSE}.
  • Rejecting the F-test means at least one predictor is linearly related to yy.
  • t-tests for individual significance evaluate H0:βi=0H_0: \beta_i=0 using t=bi/s(bi)t = b_i / s(b_i).
  • In MLR, the F-test and t-tests serve different purposes; both are necessary to fully evaluate the model.
  • MSE provides an unbiased estimate of σ2\sigma^2, and its square root ss is the standard error of estimate.
  • Always interpret the F-test first; only proceed to t-tests if overall significance is found.

Multicollinearity

Multicollinearity refers to the presence of correlation among the independent variables in a multiple linear regression model. Although these variables are called “independent,” in practice they are rarely statistically independent; some degree of correlation is normal. Multicollinearity becomes a problem only when that correlation is high.

Intuition: When two predictors carry nearly the same information, the regression cannot reliably separate their individual effects. The model still fits the data, but the estimated coefficients become unstable and their individual significance tests become misleading.

Diagnosing multicollinearity

The simplest diagnostic is the sample correlation coefficient between pairs of independent variables. A common rule of thumb: if r>0.7|r| > 0.7, multicollinearity may cause trouble.

Pair of IVsCorrelation rrTrouble?
Annual income & household size0.320.32No (low)
Monthly income & annual income0.830.83Yes (high)

Consequences of high multicollinearity

Consider the modified dataset with two highly correlated IVs: monthly income (x1x_1) and annual income (x2x_2). The regression output:

  • R2=0.66R^2 = 0.66, overall F-test significant (small pp-value) → model explains some variation.
  • t-tests for individual coefficients:
    • x1x_1 (monthly income): t0.18t \approx 0.18, pp large → cannot reject H0:β1=0H_0: \beta_1=0.
    • x2x_2 (annual income): tt large, p0p \approx 0 → significant.
  • Coefficient signs:
    • b1=202.85b_1 = -202.85 (negative, counterintuitive)
    • b2=102.74b_2 = 102.74 (positive, expected)

Interpretation: the negative sign for monthly income is nonsensical — both income measures should positively affect spending. This happens because the model cannot distinguish the separate effect of each correlated variable. Adding monthly income to a model that already contains annual income adds no new information, yet the OLS estimates become distorted.

Key points:

  • Multicollinearity inflates the standard errors of individual coefficients, making t-tests unreliable. A coefficient may appear insignificant even though the variable is genuinely related to YY.
  • In severe cases, coefficients can have the wrong sign.
  • The overall F-test for the regression can remain significant even when none of the individual coefficients are significant.

Exam tip: If the F-test is significant but all or most t-tests are not, suspect multicollinearity. Check pairwise correlations between IVs (r>0.7|r|>0.7 is a warning). The problem is with individual interpretation, not prediction — multicollinearity does not bias the overall fit or forecasts.

Handling multicollinearity

  • Avoid including highly correlated independent variables in the model. Remove one of the offending variables.
  • In the transcript example, the original model with annual income and household size (r=0.32r=0.32) is preferred.
  • When removal is not feasible (e.g., variables are theoretically important), more advanced remedies exist (e.g., ridge regression, principal components) — but these are beyond this module.

Key takeaways

  • Multicollinearity means independent variables are highly correlated (r>0.7|r|>0.7 is a common threshold).
  • Main consequence: individual t-tests become unreliable, coefficients can have wrong signs; the F-test and overall R2R^2 are affected much less.
  • It does not invalidate the model for prediction, but it does destroy interpretation of individual effects.
  • Best solution: remove one of the correlated variables from the model.

Residual Analysis in MLR

Residual analysis checks whether the assumptions made about the error term ε\varepsilon (zero mean, constant variance, normality, independence) are valid. In MLR, three types of plots are used:

  1. Residuals vs. each independent variable xix_i
  2. Residuals vs. predicted values y^\hat{y}
  3. Standardized residuals vs. independent variables (or vs. y^\hat{y})

Residual Plots Against Each Independent Variable xix_i

A scatter plot with xix_i on the horizontal axis and the residual (ei=yiy^ie_i = y_i - \hat{y}_i) on the vertical axis. One plot is generated for every independent variable.

What to look for:

PatternInterpretationAssumption status
Horizontal band (Panel A)Constant variance, model adequateHomoscedasticity holds; model is appropriate
Funnel shape (Panel B)Variability increases with xxHeteroscedasticity — constant variance violated
U‑shape / curve (Panel C)Systematic curvature remains in residualsModel is misspecified — linear form inadequate

Example – Hanumantha’s dataset (monthly spend on income x1x_1 and household size x2x_2):

  • Plot of residuals vs. annual income (x1x_1): resembles a horizontal band, no funnel or U‑shape.
  • Plot of residuals vs. household size (x2x_2): even more clearly a band.

Conclusion: Assumptions of constant variance and linearity appear satisfied.

Exam tip: A band pattern is the “gold standard.” Funnel ⇒ heteroscedasticity (fix via weighted least squares or transformation). U‑shape ⇒ try including x2x^2 or interaction terms.


Residual Plot Against Predicted Values y^\hat{y}

More widely used in MLR because it summarises all independent variables in one plot. y^\hat{y} on the horizontal axis, residuals on the vertical axis.
Excel’s Analysis Toolpak does not produce this automatically, but it can be constructed from the outputs.

Hanumantha example: The plot shows a random, band‑like pattern, consistent with the individual xix_i plots — no concern.


Standardized Residual Plot

Standardized residual for observation ii:

standardized residuali=eisei\text{standardized residual}_i = \frac{e_i}{s_{e_i}}

Because residuals from OLS have mean zero, standardisation is done by dividing by an estimate of their standard deviation. Statistical software (including Excel) provides these values.

Why it matters: If the errors ε\varepsilon are normally distributed, the standardized residuals should approximately follow a standard normal distribution. Consequently, about 95% of the standardized residuals should lie between 2-2 and +2+2.

Hanumantha example: The standardized residual plot confirms that almost all points fall inside (2,+2)(-2, +2); a few are slightly above +2+2 (possible mild outliers). This supports the normality assumption.

Exam tip: A common exam question: “What percentage of standardized residuals do you expect between ±2 under normality?” Answer: ≈95%.

Key Takeaways – Residual Analysis

  • Three plots: residuals vs. xix_i, residuals vs. y^\hat{y}, standardized residuals.
  • Horizontal band ⇒ assumptions hold; funnel ⇒ heteroscedasticity; U‑shape ⇒ model misspecification.
  • Residuals vs. y^\hat{y} is the primary diagnostic in MLR.
  • Standardized residuals outside ±2\pm 2 may indicate outliers or normality violation.
  • Excel provides residuals and standardized residuals automatically.

Outliers and Influential Observations

Outliers

An outlier is a data point that does not follow the pattern of the rest of the data.

Detection:

  • Scatter plots (preliminary visual check)
  • Standardized residuals: observations with standardized residual>2|\text{standardized residual}| > 2 are potential outliers (since 95% are inside ±2\pm 2 under normality).

Hanumantha example: A few standardized residuals slightly exceed +2+2.

Action when an outlier is found:

CauseAction
Erroneous data (recording/collection error)Correct the data and re‑run regression
Violation of model assumptionsConsider a different model (e.g., non‑linear, transformations)
Unusual but valid value (by chance)Retain the observation — don’t remove arbitrarily

Influential Observations

An influential observation is one whose removal would substantially change the estimated regression coefficients (slopes and intercept).

Sources of influence:

  • Outlier in the yy direction (large residual)
  • Extreme value of an independent variable xix_i (far from its mean)
  • A combination of both

Detection:
Advanced measures (e.g., Cook’s distance, leverage) exist but are not covered in this module. For now, rely on careful examination of any observation flagged as an outlier or extreme.

Action:

  1. Check for data errors → correct if found.
  2. If the observation is valid, it may provide valuable insight into the relationship at the extremes.
  3. Do not remove valid influential observations unless there is clear evidence they do not belong to the population being studied.
  4. If possible, collect additional data at intermediate xx values to better understand the relationship.

Exam tip: “Influential” is not the same as “outlier.” An outlier may have little influence if xx is near the mean; an extreme xx can be influential even if its residual is small.

Key Takeaways – Outliers & Influential Observations

  • Outliers: standardized residual>2|\text{standardized residual}| > 2 is a common threshold.
  • Influential observations can change regression results dramatically.
  • Always verify data integrity first.
  • Retain valid observations — do not delete merely to improve fit.
  • Advanced detection methods (Cook’s distance) exist but are beyond this module.

Recap: MLR Fundamentals (as applied to Hanumantha’s Dataset)

Model and Estimation

Multiple linear regression model:

y=β0+β1x1+β2x2++βpxp+εy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_p x_p + \varepsilon

Estimated regression equation (using OLS, minimising SSE =(yiy^i)2= \sum (y_i - \hat{y}_i)^2):

y^=b0+b1x1+b2x2++bpxp\hat{y} = b_0 + b_1 x_1 + b_2 x_2 + \cdots + b_p x_p

Hanumantha example (yy = monthly spend, x1x_1 = annual income (lakhs), x2x_2 = household size):

y^=355.7+71.17x1+339.92x2\hat{y} = 355.7 + 71.17\,x_1 + 339.92\,x_2


Goodness of Fit

  • Coefficient of determination R2=SSRSSTR^2 = \dfrac{SSR}{SST}, where SST=SSE+SSRSST = SSE + SSR.
  • Adjusted R2R^2 penalises for extra predictors; in this example R2=0.80R^2 = 0.80, Adjusted R2=0.79R^2 = 0.79.
  • Standard error of estimate S=661.1S = 661.1.

Interpretation: The model with both predictors explains about 80% of the variation in monthly spend — an improvement over simple regression with only income (R2=0.65R^2 = 0.65).


Significance Tests

  • F‑test for overall significance
    H0:β1=β2==βp=0H_0: \beta_1 = \beta_2 = \cdots = \beta_p = 0
    Test statistic F=MSRMSEF = \dfrac{MSR}{MSE}.
    Hanumantha: F=104.6F = 104.6, very small p‑value → reject H0H_0; at least one predictor is significant.

  • t‑tests for individual coefficients
    H0:βi=0H_0: \beta_i = 0, test statistic t=biSE(bi)t = \dfrac{b_i}{SE(b_i)}, df =np1= n-p-1.
    Both p‑values near zero → both x1x_1 and x2x_2 have statistically significant linear relationships with yy.


Assumptions and Diagnostics

  • Assumptions about ε\varepsilon: mean 0, constant variance (homoscedasticity), normal distribution, independence.
  • Multicollinearity: high correlation among xix_i’s makes interpretation difficult. In Hanumantha’s data, no problem with x1x_1 and x2x_2; but adding a third variable (monthly income) illustrated multicollinearity in action.
  • Residual analysis: plots showed no violations; standardized residuals mostly inside ±2\pm 2.

Key Takeaways – Recap

  • MLR uses OLS to estimate pp slope coefficients.
  • R2R^2 and adjusted R2R^2 measure explanatory power; FF‑test checks overall significance; tt‑tests check individual predictors.
  • Always verify residual assumptions (plots, standardized residuals).
  • Multicollinearity can distort signs and p‑values; examine correlation among predictors.
  • Hanumantha’s example: clean model with good fit, significant predictors, and valid residuals.

Applications with Examples

Multiple linear regression (MLR) extends simple linear regression by using two or more independent variables to predict a dependent variable. The goal is to capture more of the variation in YY by including additional predictors.

Model form:
Y=β0+β1X1+β2X2+εY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \varepsilon

The estimated regression equation is:
Y^=b0+b1X1+b2X2\hat{Y} = b_0 + b_1 X_1 + b_2 X_2

Interpretation of coefficients:

  • b1b_1: expected change in YY for a one-unit increase in X1X_1, holding X2X_2 constant.
  • b2b_2: expected change in YY for a one-unit increase in X2X_2, holding X1X_1 constant.

Two key hypothesis tests are used:

  1. Overall F-test – tests whether at least one coefficient is non-zero (H0:β1=β2=0H_0: \beta_1 = \beta_2 = 0).
  2. Individual t-tests – tests whether a specific coefficient is zero (H0:βi=0H_0: \beta_i = 0).

Exam tip: The phrase “holding constant” is the core of MLR interpretation. Always include it when explaining a slope coefficient.

Example 1: Predicting Household Debt from First Income and Monthly Payment

Context: Manjula Nayak’s Bengaluru household survey (n ≈ 500). Dependent variable: debt (₹). Independent variables: X1X_1 = first income, X2X_2 = monthly payment.

Regression output:

MeasureValue
R2R^20.45
Adjusted R2R^20.448
Standard error25644
b0b_013081
b1b_1 (income)0.025
b2b_2 (monthly payment)2.09
SE(b1)SE(b_1)0.003
SE(b2)SE(b_2)0.188
tt-stat for b1b_18.74 (p ≈ 0)
tt-stat for b2b_211.1 (p ≈ 0)
F-statistic203 (p ≈ 0)
SSRSSR2.68×10112.68 \times 10^{11}
SSESSE3.27×10113.27 \times 10^{11}
SSTSST5.94×10115.94 \times 10^{11}
MSRMSR1.34×10111.34 \times 10^{11}
MSEMSE6.576×1086.576 \times 10^8

Interpretation:

  • R2R^2 = 0.45: The model explains 45% of the variation in debt. This is higher than the simple regression R2R^2 for income alone (0.31) or monthly payment alone (0.37).
  • Adjusted R2R^2R2R^2 because of large sample size (n=500).
  • Standard error = 25644 – smaller than the simple regression standard errors (~28,619 for income; ~27,518 for monthly payment).
  • Coefficient b1b_1 = 0.025: For every ₹1 increase in first income, holding monthly payment constant, debt increases by ₹0.025.
  • Coefficient b2b_2 = 2.09: For every ₹1 increase in monthly payment, holding income constant, debt increases by ₹2.09.
  • Both t-tests reject H0H_0 (p ≈ 0): both predictors have a significant linear relationship with debt.
  • F-test rejects H0H_0 (p ≈ 0): at least one predictor is significant; the overall model is useful.

Residual analysis:

  • Standardized residuals: most within ±2, a few outside.
  • Residual vs. X1X_1 and residual vs. X2X_2 plots show an oval pattern – not a perfect random band, but no funnel shape or curvature (acceptable).
  • Residual vs. fitted plot similar – no major violations.

Key takeaways – Model 1

  • Two predictors explain more variation than either alone (R2R^2 increased).
  • Both income and monthly payment are significant individual predictors.
  • Model still leaves 55% of variation unexplained – debt depends on other factors.
  • Residual plots are adequate; no strong evidence of heteroscedasticity or nonlinearity.

Example 2: Predicting Household Debt from Monthly Payment and Utilities

Context: Same dataset, different predictors: X1X_1 = monthly payment, X2X_2 = utilities.

Regression output:

MeasureValue
R2R^20.67
Adjusted R2R^2≈0.67
Standard error19839
b0b_0-140771
b1b_1 (monthly payment)1.44
b2b_2 (utilities)168.91
SE(b1)SE(b_1)0.143
SE(b2)SE(b_2)7.87
tt-stat for b1b_110.02 (p ≈ 0)
tt-stat for b2b_221.47 (p ≈ 0)
F-statistic506.9 (p ≈ 0)
SSRSSR3.99×10113.99 \times 10^{11}
SSESSE1.96×10111.96 \times 10^{11}
SSTSST5.94×10115.94 \times 10^{11}
MSRMSR1.99×10111.99 \times 10^{11}
MSEMSE3.936×1083.936 \times 10^8

Interpretation:

  • R2R^2 = 0.67: Model explains 67% of debt variation – a clear improvement over Model 1 (0.45) and over the simple regressions (0.31 for income, 0.37 for monthly payment).
  • Standard error = 19839 – lower than Model 1 (25644), indicating more precise predictions.
  • Coefficient b1b_1 = 1.44: For every ₹1 increase in monthly payment, holding utilities constant, debt increases by ₹1.44.
  • Coefficient b2b_2 = 168.91: For every ₹1 increase in utilities, holding monthly payment constant, debt increases by ₹168.91.
  • Both t-tests significant (p ≈ 0).
  • F-statistic = 506.9 (p ≈ 0) – overall model highly significant.

Comparison of SSR and SSE:

  • SSRSSR increased from 2.68×10112.68 \times 10^{11} (Model 1) to 3.99×10113.99 \times 10^{11} (Model 2).
  • SSESSE decreased from 3.27×10113.27 \times 10^{11} to 1.96×10111.96 \times 10^{11}.
  • SSTSST remains the same (5.94×10115.94 \times 10^{11}) because total variation in debt is fixed.

Exam tip: SSTSST is constant across models for the same YY; changes in R2R^2 are driven entirely by SSRSSR (or equivalently SSESSE).

Residual analysis:

  • Standardized residuals: mostly within ±2, a few outliers.
  • Residual vs. X1X_1, vs. X2X_2, vs. fitted values all show random scatter – no patterns (oval, funnel, or curvature).
  • This model appears more reliable than Model 1 in terms of residual diagnostics.

Important caveat:
The lecture explicitly warns “regression does not establish causality; only association.” A higher utility bill does not necessarily cause more debt; it may reflect a larger house or higher usage, which correlates with debt.

Key takeaways – Model 2

  • Model with monthly payment and utilities performs better (R2=0.67R^2=0.67, lower SESE) than the model with income and monthly payment.
  • Both predictors are highly significant individually and jointly.
  • Residual plots show random scatter – no serious violations of linear regression assumptions.
  • Better R2R^2 does not mean causality; always interpret associations cautiously.
  • The choice of independent variables strongly affects model performance.

Three-Variable Multiple Linear Regression (Household Debt Data)

After observing that two different two-variable models (monthly payment + utilities; first income + monthly payment) each yielded significant relationships, a model combining all three predictors is tested: debt yy as a function of first income x1x_1, monthly payment x2x_2, and utilities x3x_3.

The estimated regression equation from Excel (Analysis ToolPak) is:

y^=140378+0.017x1+0.96x2+157.95x3\hat{y} = -140378 + 0.017 x_1 + 0.96 x_2 + 157.95 x_3

Model Fit Statistics

StatisticValueComparison to Best Two-Variable Model (x2,x3x_2,x_3)
R2R^20.708Higher (0.67 previously)
Adjusted R2R^2~0.70 (slightly less than R2R^2)Close to R2R^2
Standard Error18,699Lower (19,839 previously)
SSRSSR4.21×10114.21 \times 10^{11}Higher (3.99×10113.99 \times 10^{11})
SSESSE1.73×10111.73 \times 10^{11}Lower (1.96×10111.96 \times 10^{11})
SSTSST5.94×10115.94 \times 10^{11} (unchanged)

The three-variable model explains 70% of the variation in household debt, the best fit so far.

ANOVA and Overall Significance

  • Degrees of freedom: regression = 3, error = 496.
  • MSR=SSR3=1.40×1011MSR = \frac{SSR}{3} = 1.40 \times 10^{11}, MSE=SSE496=349,653,451MSE = \frac{SSE}{496} = 349,653,451.
  • F=MSRMSE=401.6F = \frac{MSR}{MSE} = 401.6, p0p \approx 0.

Conclusion: Reject H0:β1=β2=β3=0H_0: \beta_1 = \beta_2 = \beta_3 = 0. There is significant overall linear relationship.

Coefficient Estimates and Individual t-Tests

VariableCoefficientStd. Errort-statisticp-value
Intercept (b0b_0)-140,378
First income (b1b_1)0.0170.0027.96~0
Monthly payment (b2b_2)0.960.1486.5~0
Utilities (b3b_3)157.957.5420.95~0

All three coefficients are statistically significant (p ≈ 0). Interpretation (ceteris paribus):

  • For every ₹1 increase in first income, debt increases by ₹0.017.
  • For every ₹1 increase in monthly payment, debt increases by ₹0.96.
  • For every ₹1 increase in utilities, debt increases by ₹157.95.

Exam tip: In multiple regression, the interpretation of a coefficient is "holding all other predictors constant." This is the key distinction from simple regression.

Residual Analysis

  • Standardized residuals mostly within ±3 range; a few points exceed ±3 (possible outliers) — more visible because the model fits better and the standard error is lower.
  • Plots of residuals against x1x_1, x2x_2, x3x_3, and y^\hat{y} all show random scatter above and below zero → no obvious violation of linearity or homoscedasticity.

Overall, the three-variable model is the strongest so far for this dataset.


Simple Linear Regression on Real Estate Data (Property Prices)

Dataset: 30 flats in Jayalakshmi Puram, Mysuru. Variables include selling price yy (in lakhs), area in sq. ft. xx, number of bedrooms/bathrooms, premium locality, gated complex, amenities. Only area is used in this simple linear regression (SLR).

Scatter Plot and Trend Line

Rough positive linear trend with several potential outliers. Trend line equation:

y^=28.37+0.0968x\hat{y} = 28.37 + 0.0968 \cdot x

R2=0.44R^2 = 0.44 — only 44% of variation in selling price explained by area.

Regression Output (ToolPak)

StatisticValue
R2R^20.44
Adjusted R2R^20.43
Standard Error (ss)70.57 lakhs
SSRSSR111,539
SSESSE139,462
SSTSST251,001
MSRMSR111,539
MSEMSE4,981
FF (1,28)22.39, p0p \approx 0

Coefficients and t-Test

VariableCoefficientStd. Errort-statisticp-value
Intercept (b0b_0)28.37
Area (b1b_1)0.0960.024.73~0

Interpretation: For every 1 sq. ft. increase in area, selling price increases by 0.096 lakhs (₹9,600). The relationship is statistically significant.

Exam tip: The large coefficient magnitude (₹9,600 per sq. ft.) results from having only one predictor. Adding other relevant variables will likely change this coefficient (and reduce omitted variable bias).

Residual Analysis

  • Standardized residuals: a few points beyond ±3 (possible outliers).
  • Plots of residuals vs. xx and vs. y^\hat{y} show random scatter → no major pattern.

This SLR is a starting point. The lecture indicates that building a multiple linear regression with additional predictors (bedrooms, bathrooms, locality, etc.) could improve the model.


Key Takeaways

  • Adding more relevant predictors can increase R2R^2 and lower standard error, as seen in the debt model (three variables outperformed two).
  • In multiple regression, each coefficient is interpreted "holding all other variables constant."
  • The FF-test checks overall significance; t-tests check individual significance.
  • Residual plots should be random; points beyond ±3 standardized residuals may be outliers.
  • Simple linear regression can underfit; multiple regression often provides better explanation and more reliable coefficient estimates.

Exam tip: When comparing models, prefer adjusted R2R^2 over plain R2R^2 because it penalizes adding unnecessary variables. Also, always check residual plots for violations.

MLR Application – Real Estate Example

We aim to improve the simple linear regression model that predicts flat selling price (₹ lakhs) using only area (sq ft) by adding other quantitative variables: number of bedrooms and number of bathrooms. The dataset contains 30 flats from Jayalakshmi Puram, Mysore. The baseline model:

y^=28.37+0.0968x(area)\hat{y} = 28.37 + 0.0968x \quad\text{(area)}

R2=0.44R^2 = 0.44: only 44% of variation in price is explained by area alone. Both the overall F‑test and the t‑test confirmed a significant linear relationship.

Baseline Simple Linear Regression Recap

MetricValue
R2R^20.44
Standard error70.57
SSR111,539
SSE139,461
SST251,001

Model 1: Price = f(Area, Bedrooms)

Estimated Equation

y^=29.19+0.085×Area+23.46×Bedrooms\hat{y} = -29.19 + 0.085 \times \text{Area} + 23.46 \times \text{Bedrooms}

Regression Summary

MetricValue
R2R^20.46
Adjusted R2R^20.42
Standard error70.74
SSR115,892
SSE135,109
SST251,001
MSR57,946
MSE5,004
F-statistic11.58
p-value (F)0.0002

Coefficient Table

PredictorCoef.Std. Errort-statp-value
Intercept−29.19
Area (sq ft)0.0850.0243.460.002
Bedrooms23.4625.150.9320.36

Interpretation

  • Overall F‑test: H0:β1=β2=0H_0: \beta_1 = \beta_2 = 0 is rejected (p=0.0002p=0.0002) → at least one predictor is useful.
  • t‑test for Bedrooms: p=0.36p=0.36 → cannot reject H0:β2=0H_0: \beta_2 = 0. Adding bedrooms does not significantly improve the model once area is already included.
  • Residual plots showed no alarming patterns (two standardized residuals >2, otherwise fine).

Why does bedrooms become insignificant?

The correlation between area and bedrooms is 0.542. Although this is below the common rule‑of‑thumb threshold of 0.7, multicollinearity still inflates the standard error of the bedrooms coefficient, making its t‑test non‑significant. The diagnostic tells us: given area, bedrooms add little unique information.


Model 2: Price = f(Area, Bathrooms)

Estimated Equation

y^=10.61+0.084×Area+17.80×Bathrooms\hat{y} = 10.61 + 0.084 \times \text{Area} + 17.80 \times \text{Bathrooms}

Regression Summary

MetricValue
R2R^20.45
Adjusted R2R^20.41
Standard error71.18
SSR114,185
SSE136,816
SST251,001
MSR57,092
MSE5,067
F-statistic11.26
p-value (F)0.0003

Coefficient Table

PredictorCoef.Std. Errort-statp-value
Intercept10.61
Area (sq ft)0.0840.005
Bathrooms17.800.7230.48

Note: Exact standard errors not given in transcript; t‑stat and p‑values are reported.

Observations

  • R2R^2 (0.45) is barely different from the simple model (0.44) and slightly worse than Model 1 (0.46).
  • Again the t‑test for bathrooms is non‑significant (p=0.48p=0.48), while the overall F‑test remains significant.
  • Correlation between area and bathrooms is 0.659 – higher than before, confirming multicollinearity.

Diagnosing Multicollinearity

Multicollinearity occurs when predictor variables are highly correlated, making it difficult to isolate their individual effects on the response.

PairCorrelation
Area ↔ Bedrooms0.542
Area ↔ Bathrooms0.659

Exam tip: A non‑significant t‑test for an individual coefficient in a multiple regression does not always mean the variable is irrelevant. When predictors are correlated, the shared information can cause inflated standard errors. The overall F‑test may still be significant, indicating the model as a whole is useful.

Key Takeaways from the two models:

  • Adding bedrooms or bathrooms to a model that already includes area yields only marginal improvement in R2R^2 (0.44 → 0.46 or 0.45).
  • The F‑test for overall significance is significant in both models, confirming that at least one predictor (area) is important.
  • The individual t‑tests for bedrooms and bathrooms are non‑significant because of multicollinearity with area.
  • Multicollinearity can exist even with correlations below 0.7; diagnostics (t‑tests, VIF) are needed.
  • With only these quantitative variables exhausted, the next step is to incorporate qualitative variables (premium locality, gated community, amenities) – covered in the next module.

What did we learn?

  • Adding more variables does not guarantee a better model; multicollinearity can limit the gain.
  • Use the combination of overall F‑test and individual t‑tests together to guide variable selection.
  • When a variable is redundant given others, remove it to keep the model parsimonious.

Intercept (β0\beta_0) – Why It’s Often Ignored

Most regression output includes a test for β0\beta_0: H0:β0=0vs.Ha:β00H_0: \beta_0 = 0 \quad \text{vs.} \quad H_a: \beta_0 \neq 0 However, this hypothesis is rarely of practical interest.

  • Inferences on β0\beta_0 are special cases of inferences on the fitted value of the regression line as a whole – concepts like confidence intervals for predicted and estimated values of YY.
  • The pp-value for β0\beta_0 in standard computer output is usually not important and is often ignored.

Extrapolation risk: If the training data do not include cases where all Xj=0X_j = 0, then using the equation to predict YY at X=0X=0 is extrapolation – outside the range of observed data. Such predictions are unreliable.

Exam tip: Never interpret β0\beta_0 as a meaningful baseline unless the data actually contain observations near X=0X=0. The intercept is often a mathematical necessity, not a substantive parameter.

Omitted Variable Bias (OVB)

OVB occurs when a regression model excludes one or more relevant independent variables. The included variables then absorb some of the effect of the omitted variables, leading to biased coefficients (over‑ or underestimation of true contributions).

Conditions for OVB

For omitted variable bias to exist, both of the following must hold:

  1. The omitted variable is correlated with the dependent variable YY.
  2. The omitted variable is correlated with at least one included independent variable.

Example (household debt data):

  • YY = debt, X1X_1 = income, X2X_2 = monthly payments, X3X_3 = utilities.
  • Simple linear regression (debt ~ income only) yields R2=0.31R^2 = 0.31.
  • Correlations (from sample):
VariableCorrelation with Debt
Income (X1X_1)0.56
Monthly payments (X2X_2)0.61
Utilities (X3X_3)0.78
  • Correlations among XX variables:
    • Monthly payments & income: 0.55
    • Utilities & income: 0.39
    • Utilities & monthly payments: 0.49

Both conditions hold → OVB present.

How to detect OVB

  • R2R^2 increases significantly when omitted variables are added.
    (Example: 0.31 → 0.71)
  • Standard error drops substantially.
  • pp-values of included variables drop (become more significant) after adding omitted ones.

Quantifying OVB

Coefficient bias can be estimated (details beyond this module), but the key diagnostic is the improvement in model fit when the omitted variables are included.

flowchart TD
    A[Model with omitted variable] --> B{Check R² and SE}
    B -->|Add omitted variable| C[New model]
    C --> D{Compare}
    D -->|R² increase, SE drop, p-values drop| E[OVB confirmed]
    D -->|Little change| F[No strong OVB]

Key takeaways

  • The intercept β0\beta_0 test (H0:β0=0H_0:\beta_0=0) is usually unimportant; avoid extrapolating to X=0X=0 outside the data range.
  • Omitted variable bias arises when an excluded variable correlates with both YY and included XXs.
  • Detect OVB by adding omitted variables and observing a large jump in R2R^2, a drop in standard errors, and improved pp-values.
  • OVB causes included coefficients to be biased – the included variable “soaks up” effects that belong to the omitted one.

Multiple Linear Regression – Module Recap

The module covered the full workflow for building and validating an MLR model.

Model form
Y=β0+β1X1+β2X2++βpXp+εY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots + \beta_p X_p + \varepsilon E(Y)=β0+β1X1+β2X2++βpXpE(Y) = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots + \beta_p X_p

Estimated regression equation
Y^=b0+b1X1+b2X2++bpXp\hat{Y} = b_0 + b_1 X_1 + b_2 X_2 + \cdots + b_p X_p

Key steps covered in this module:

  • Least squares estimation – finding bjb_j to minimize (YiY^i)2\sum (Y_i - \hat{Y}_i)^2.
  • Multiple coefficient of determination (R2R^2) – measure of overall fit.
  • Assumptions on the error term ε\varepsilon – zero mean, constant variance, independence, normality.
  • F-test for overall significance of the entire regression.
  • t-tests for individual parameters βj\beta_j (for j1j \ge 1).
  • Multicollinearity – its detection and consequences.
  • Omitted variable bias – conditions, detection, impact.
  • Residual analysis – identifying outliers and influential observations.
  • Iterative model building – comparing and improving models using tools like Analysis ToolPak.

The next module will extend MLR to include categorical variables, followed by a course summary.

Key takeaways

  • MLR models a linear relationship between YY and multiple XXs.
  • The estimated coefficients bjb_j are sample statistics estimating population parameters βj\beta_j.
  • Model validation uses R2R^2, F-test, t-tests, and residual analysis.
  • Omitted variable bias and multicollinearity are critical pitfalls to check during model building.

Multiple Linear Regression - II

Categorical Variables in Multiple Linear Regression

Many real-world datasets contain qualitative or categorical variables (e.g., brand, location, ownership). Including them in a regression model often improves fit and prediction. The core idea is to convert categories into numeric form using dummy (indicator) variables and then proceed with standard multiple linear regression.

The Dummy Variable Approach

A dummy variable takes only values 0 or 1 to represent membership in a category.
For a categorical variable with two categories, a single dummy variable suffices:

x2={1if Lenovo0if Dellx_2 = \begin{cases} 1 & \text{if Lenovo} \\ 0 & \text{if Dell} \end{cases}

The regression model becomes:

y=β0+β1x1+β2x2+ϵy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon

where x1x_1 is a quantitative predictor (e.g., price) and x2x_2 is the dummy. The coefficient β2\beta_2 measures the average difference in the dependent variable between the two categories, holding x1x_1 constant.

Exam tip: For a categorical variable with kk categories, use exactly k1k-1 dummy variables to avoid perfect multicollinearity (the dummy variable trap). The omitted category becomes the reference group.

Worked Example: Basavaraja’s Customer Satisfaction Data

  • Dependent variable yy: Satisfaction score (0–100)
  • Quantitative predictor x1x_1: Price paid (in ₹ lakhs)
  • Categorical predictor: Brand (Lenovo vs. Dell)
  • Dummy variable x2x_2: 11 if Lenovo, 00 if Dell
  • Sample size: n=36n = 36

Simple Regression (price only)

The estimated equation was:

y^=48.43+1.32x1\hat{y} = 48.43 + 1.32\,x_1
  • R2=0.31R^2 = 0.31 (or 0.36 in an earlier run – the lecture noted inconsistency)
  • Standard error =5.19= 5.19
  • F=18.9F = 18.9, p0p \approx 0

Multiple Regression with Dummy Variable

Using the dummy variable, the estimated equation (from Excel Analysis ToolPak) is:

y^=46.83+1.29x1+3.93x2\hat{y} = 46.83 + 1.29\,x_1 + 3.93\,x_2

Model comparison

MetricSimple modelMultiple model
R2R^20.310.45
Standard error5.194.85
SSR510.8648.2
SSE914.8777.4
SST1425.61425.6 (same)

ANOVA

SourceSSdfMSFFpp-value
Regression648.22324.113.750\approx 0
Error777.43323.56
Total1425.635

The overall FF-test rejects H0:β1=β2=0H_0: \beta_1 = \beta_2 = 0, confirming a significant linear relationship.

Coefficient estimates and tt-tests

VariableCoefficientStd. errorttpp-value
Intercept (b0b_0)46.83
Price (b1b_1)1.290.2834.580\approx 0
Brand dummy (b2b_2)3.931.632.420\approx 0

Both predictors are individually significant. Interpretation:

  • Price: For each additional ₹1 lakh, satisfaction score increases by 1.29 points, holding brand constant.
  • Brand dummy: Lenovo customers score, on average, 3.93 points higher than Dell customers who pay the same price.

How Dummy Variables Change the Regression Lines

The model implies two parallel lines (same slope β1\beta_1) with different intercepts:

  • Dell (x2=0x_2=0): y^=46.83+1.29x1\hat{y} = 46.83 + 1.29 x_1
  • Lenovo (x2=1x_2=1): y^=(46.83+3.93)+1.29x1=50.76+1.29x1\hat{y} = (46.83 + 3.93) + 1.29 x_1 = 50.76 + 1.29 x_1

The vertical distance between the lines is exactly 3.933.93 – the estimated brand effect.

Key Takeaways

  • Dummy variables convert qualitative categories into 0/1 numeric values for regression.
  • For two categories, one dummy is enough; the coefficient tells the average shift relative to the reference category.
  • Adding a significant dummy improves R2R^2 and reduces standard error, as seen in the increase from 0.31 to 0.45.
  • The FF-test checks overall model significance; tt-tests check each predictor (including the dummy) individually.
  • Interpretation of a dummy coefficient: ceteris paribus (holding other predictors constant), the mean outcome differs by β^2\hat{\beta}_2 between the two categories.

Interpretation of Coefficients (Categorical Variables)

When a categorical variable enters a multiple linear regression, each category shifts the intercept of the regression line (assuming no interaction with other predictors). The slope(s) for continuous predictors are shared across all categories, so the effect of a categorical predictor is a parallel shift of the regression plane.

Binary Dummy Variable (Two Categories)

For data with two brands (Dell and Lenovo), define one dummy variable:

[ x_2 = \begin{cases} 0 & \text{brand = Dell}\ 1 & \text{brand = Lenovo} \end{cases} ]

The model with price (x1x_1) and brand is

[ E(Y) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 ]

Substituting the two values of x2x_2 gives separate equations:

Brandx2x_2Regression Equation
Dell0E(YDell)=β0+β1x1E(Y \mid \text{Dell}) = \beta_0 + \beta_1 x_1
Lenovo1E(YLenovo)=(β0+β2)+β1x1E(Y \mid \text{Lenovo}) = (\beta_0 + \beta_2) + \beta_1 x_1

Interpretation:

  • β1\beta_1 = effect of a one‑unit increase in price on mean satisfaction, holding brand constant.
  • β2\beta_2 = mean difference in satisfaction between Lenovo and Dell, at any given price.
    • β2>0\beta_2 > 0: Lenovo has higher average satisfaction.
    • β2<0\beta_2 < 0: Dell has higher average satisfaction.
    • β2=0\beta_2 = 0: brand does not affect satisfaction.

Example (Chroma data – estimated model)

[ \hat{y} = 46.84 + 1.29, \text{Price} + 3.93, x_2 ]

Substituting the two brand cases:

  • Dell (x2=0x_2=0): y^=46.84+1.29Price\hat{y} = 46.84 + 1.29 \cdot \text{Price}
  • Lenovo (x2=1x_2=1): y^=(46.84+3.93)+1.29Price=50.77+1.29Price\hat{y} = (46.84 + 3.93) + 1.29 \cdot \text{Price} = 50.77 + 1.29 \cdot \text{Price}

Interpretation: On average, Lenovo satisfaction is 3.93 points higher than Dell, regardless of price.


Categorical Variable with k>2k > 2 Categories

Rule: A categorical variable with kk levels requires k1k-1 dummy variables, each coded as 0 or 1. One category becomes the baseline (all dummies = 0); all other categories are compared to this baseline.

Example: Three Brands (Lenovo, Dell, Asus)

We need k1=2k-1 = 2 dummies:

[ x_1 = \begin{cases}1 & \text{Lenovo}\0 & \text{otherwise}\end{cases} \qquad x_2 = \begin{cases}1 & \text{Dell}\0 & \text{otherwise}\end{cases} ]

The baseline category (both dummies =0=0) is Asus.

Model: E(Y)=β0+β1x1+β2x2E(Y) = \beta_0 + \beta_1 x_1 + \beta_2 x_2

Brandx1x_1x2x_2E(Y)E(Y) Equation
Asus00β0\beta_0
Lenovo10β0+β1\beta_0 + \beta_1
Dell01β0+β2\beta_0 + \beta_2

Interpretation (with Asus as baseline):

  • β0\beta_0 = mean satisfaction for Asus.
  • β1\beta_1 = mean difference between Lenovo and Asus.
  • β2\beta_2 = mean difference between Dell and Asus.

Baseline choice is arbitrary. If we instead chose Lenovo as baseline, the dummy coding changes and so do coefficient interpretations – but the model’s fit and predictions remain identical.

Exam tip: Never create kk dummy variables for a kk-level categorical variable – that introduces perfect multicollinearity (the dummy variable trap). Always use exactly k1k-1 dummy variables.

Key Takeaways

  • Dummy variables allow categorical predictors to shift the intercept while keeping slopes constant.
  • For a binary categorical, one dummy variable; its coefficient = difference in mean response between the two groups.
  • For kk categories, use k1k-1 dummies (0/1 coding); the omitted category is the baseline.
  • The estimated dummy coefficient = predicted difference in response between that category and the baseline, holding other predictors constant.
  • Baseline choice is arbitrary; coefficient interpretations change relative to baseline, but predictions are unchanged.

Adding a Binary Dummy: Ownership

The starting model was a multiple regression with three continuous predictors:

Y=β0+β1X1+β2X2+β3X3+εY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_3 + \varepsilon

where
YY = debt,
X1X_1 = first income,
X2X_2 = monthly payment,
X3X_3 = utilities.

Estimated equation from previous section:

Y^=140378+0.017X1+0.96X2+157.95X3\hat{Y} = -140378 + 0.017 X_1 + 0.96 X_2 + 157.95 X_3

R2=0.708R^2 = 0.708, standard error =18699= 18699.

Intuition:
Whether a household owns its home may affect debt – owners might have lower debt (e.g., paid-off property). To test this, add a dummy variable that flags ownership.

Model with ownership dummy:

Y=β0+β1X1+β2X2+β3X3+β4X4+εY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_3 + \beta_4 X_4 + \varepsilon

where
X4=1X_4 = 1 if the household owns the house, 00 if it rents.

Results

MetricBefore (3 predictors)After adding X4X_4
R2R^20.7080.712
Standard error1869918594
b0b_0–140378–185988
b1b_1 (first income)0.0170.017
b2b_2 (monthly payment)0.961.05
b3b_3 (utilities)157.95200
b4b_4 (ownership)–12837

Interpretation of b4b_4:
Holding all other factors constant, a household that owns its home has $12837 less debt on average than a comparable renting household.

CoefficientValueStd. errorttpp-value
b4b_4–128375003–2.560.01

p<0.05p < 0.05 → reject H0:β4=0H_0: \beta_4 = 0. Ownership has a statistically significant linear association with debt. The overall F-test also remains significant.

Residual diagnostics:
All residual plots (vs. each predictor and vs. fitted values) show random scatter; no pattern violations.

Exam tip: The dummy coefficient represents the shift in the intercept for the group coded 1. For two groups (own vs. rent), the model produces two parallel regression planes:

  • Renters: Y^=b0+b1X1+b2X2+b3X3\hat{Y} = b_0 + b_1 X_1 + b_2 X_2 + b_3 X_3
  • Owners: Y^=(b0+b4)+b1X1+b2X2+b3X3\hat{Y} = (b_0 + b_4) + b_1 X_1 + b_2 X_2 + b_3 X_3
    The slope coefficients of the continuous variables remain the same.

Adding a Multi‑Level Categorical Variable: Location

Intuition:
Debt might vary by geographic region. The variable location has four categories: Southeast (SE), Northwest (NW), Northeast (NE), Southwest (SW). To include a kk-level categorical variable, we need k1k-1 dummy variables. Choose SE as the baseline (reference) category.

Define three dummies

VariableDefinition
X5X_511 if Northwest, 00 otherwise
X6X_611 if Northeast, 00 otherwise
X7X_711 if Southwest, 00 otherwise

When all three are 00, the property is in Southeast (baseline).

Extended model:

Y=β0+β1X1+β2X2+β3X3+β4X4+β5X5+β6X6+β7X7+εY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_3 + \beta_4 X_4 + \beta_5 X_5 + \beta_6 X_6 + \beta_7 X_7 + \varepsilon

Results

MetricWith ownership (3+1)After adding location dummies
R2R^20.7120.714
Standard error1859418589
CoefficientValueStd. errorttpp-value
b0b_0–184243
b1b_1 (first income)0.015<0.05
b2b_2 (monthly payment)0.96<0.05
b3b_3 (utilities)200<0.05
b4b_4 (ownership)–12857<0.05
b5b_5 (NW)422934711.220.22
b6b_6 (NE)293525311.160.25
b7b_7 (SW)521128811.810.07

Interpretation of location coefficients:
Each dummy’s coefficient represents the average difference in debt compared to the baseline (SE), holding all else constant. For example, a household in the Northwest is predicted to have $4229 more debt than an otherwise identical household in the Southeast.

Significance tests:
None of the three location dummy coefficients are statistically significant at α=0.05\alpha = 0.05 (all p>0.05p > 0.05). Therefore we cannot reject H0:β5=0H_0: \beta_5 = 0, H0:β6=0H_0: \beta_6 = 0, H0:β7=0H_0: \beta_7 = 0. Adding location does not meaningfully improve the model.

The adjusted R2R^2 (though not explicitly reported) would likely decrease given the non‑significant extra predictors.

Implicit regression equations:
The model generates a separate equation for each combination of ownership and location – eight in total. For example, for a renting household in the Northwest:

Y^=b0+b1X1+b2X2+b3X3+b5\hat{Y} = b_0 + b_1 X_1 + b_2 X_2 + b_3 X_3 + b_5

For an owning household in the Southeast (baseline location):

Y^=(b0+b4)+b1X1+b2X2+b3X3\hat{Y} = (b_0 + b_4) + b_1 X_1 + b_2 X_2 + b_3 X_3

Lessons from the “Failures”

  • Starting with an already strong model (R20.71R^2 \approx 0.71) makes it hard to improve with additional variables.
  • Adding non‑significant categorical dummies increases complexity without real gain – risk of overfitting.
  • Regression itself tells us which variables are relevant. The t‑tests and overall lack of improvement suggest that the three original continuous variables (first income, monthly payment, utilities) capture the dominant drivers of debt.
  • Good model building requires balancing performance and complexity; not every collected variable deserves a place in the model.

Key takeaways

  • Binary dummies (0/1) shift the intercept for one group; interpretation is the expected difference in YY relative to the reference group.
  • For a kk-level categorical variable, create k1k-1 dummies; the omitted category becomes the baseline.
  • Adding a categorical variable does not automatically improve a model – check individual t‑tests and R2R^2 / adjusted R2R^2.
  • In the example, ownership was significant (small improvement), but location was not (all dummies p>0.05p>0.05).
  • A model with three continuous predictors already explained ~71% of debt variation; further gains are marginal.

Example: Categorical Variables in Flat Price Model

Adding categorical (qualitative) variables to a regression lets us capture non‑numerical factors like location, amenities, or neighbourhood type.
In the flat‑price data from Mysuru (30 properties), the initial model used only area (square feet) and gave R2=0.44R^2 = 0.44 — nearly 56% of price variation was unexplained.
The real‑estate analyst had three dummy variables: premium location, gated community, and good amenities, each coded as 1 = yes, 0 = no.

Motivation and Data

VariableTypeDescription
Selling price (yy)Quantitative₹ lakhs
Area (x1x_1)QuantitativeSquare feet
Premium location (x2x_2)Dummy1 if premium, 0 otherwise
Gated community (x4x_4)Dummy1 if gated, 0 otherwise
Amenities (x3x_3)Dummy1 if good amenities, 0 otherwise

Quantitative variables (bedrooms, bathrooms) were dropped because of multicollinearity with area — a reminder that adding correlated predictors does more harm than good.


Model 1: Add Premium Location Only

y=β0+β1x1+β2x2+εy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \varepsilon

Estimated equation: y^=3.92+0.087x1+86.2x2\hat{y} = -3.92 + 0.087 x_1 + 86.2 x_2

MetricSimple (area only)With premium location
R2R^20.440.66
Adjusted R2R^20.430.63
Standard error70.5756.35
FF-statistic26.03 (p0p \approx 0)
  • b1b_1: Each additional sq.ft. → price higher by ₹8,700 (0.087 lakhs).
    t=5.31t = 5.31, p0p \approx 0 → significant.
  • b2b_2: Premium location adds ₹86.2 lakhs, holding area constant.
    t=4.11t = 4.11, p0p \approx 0 → significant.
  • Residual diagnostics: standardized residuals all <3<3 in absolute value, plots random.

Exam tip: When a dummy coefficient is large and significant, the qualitative factor has a major impact on the outcome — here location alone adds over ₹86 lakhs.


Model 2: Add All Three Dummy Variables

y=β0+β1x1+β2x2+β3x3+β4x4+εy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \varepsilon

Estimated equation:

y^=43.99+0.078x1+95.66x2+35.74x3+55.38x4\hat{y} = -43.99 + 0.078 x_1 + 95.66 x_2 + 35.74 x_3 + 55.38 x_4
MetricModel 1 (1 dummy)Model 2 (3 dummies)
R2R^20.660.80
Adjusted R2R^20.630.77
Standard error56.3544.64
FF-statistic26.0325.25 (p0p \approx 0)

Coefficient significance (all pp-values are low):

VariableCoefficientInterpretation
Area (x1x_1)0.078₹7,800 per sq.ft.
Premium location (x2x_2)95.66Adds ₹95.66 lakhs
Amenities (x3x_3)35.74Adds ₹35.74 lakhs
Gated community (x4x_4)55.38Adds ₹55.38 lakhs
  • All t‑statistics had p<0.05p < 0.05 (amenities p=0.04p=0.04, others near 0). Every variable should be retained.
  • Omitted variable bias: The area coefficient dropped from 0.087 (Model 1) to 0.078 (Model 2). Earlier, area was partly picking up the effect of omitted categorical factors. Including them gives a cleaner estimate.

Residual diagnostics: Standardized residuals all within ±3\pm 3, plots random across xx's and y^\hat{y}.


Interpreting Dummy Coefficients

With multiple dummies, the model implicitly contains 2k2^k different regression equations (one for each combination). For example, a property with all three features:

y^=43.99+0.078x1+95.66+35.74+55.38=142.79+0.078x1\hat{y} = -43.99 + 0.078 x_1 + 95.66 + 35.74 + 55.38 = 142.79 + 0.078 x_1

Each dummy adds a fixed shift to the intercept, while the slope for area stays common. This is the parallel‑lines interpretation.


Key Takeaways

  • Categorical variables are essential in real‑estate models — they often explain more variance than quantitative predictors.
  • Dummy coding (0/1) turns qualitative information into a numeric predictor; the coefficient is the expected change when the characteristic is present.
  • Adding relevant dummies can dramatically improve R2R^2 (0.44 → 0.80) and reduce standard error.
  • Always check for multicollinearity among predictors (e.g., bedrooms, bathrooms, and area) before including them.
  • Omitted variable bias appears when excluded categorical factors are correlated with included variables — coefficient estimates for included variables may change when relevant dummies are added.
  • Residual diagnostics remain essential: ensure plots are random and standardized residuals stay under 3 in absolute value.

Exam tip: When interpreting a dummy coefficient, always state “holding other variables constant.” The coefficient is the premium (or discount) associated with that category compared to the base case (all dummies = 0).

What are interaction variables?

An interaction variable is the product of two independent variables—often a continuous variable and a categorical variable. Including it in a regression model tests for conditional relationships: does the effect of one predictor depend on the value of another?

Interaction term=x1×x2\text{Interaction term} = x_1 \times x_2

The model remains linear in the coefficients (e.g., β0,β1,β2,β3\beta_0, \beta_1, \beta_2, \beta_3), even though it multiplies xx’s. This is still a linear regression.

Why they matter: the moderation concept

A moderation variable changes the relationship between the dependent variable yy and another independent variable. The regression coefficient of the interacted variable (x2x_2) is contingent on the moderator (x1x_1). Two groups get different slopes.

Worked example: salary, gender, and work experience

From Jyoti Hegde’s survey: 30 respondents, variables:

  • yy = salary (continuous)
  • x1x_1 = gender (1 = women, 0 = men)
  • x2x_2 = work experience in months (continuous)

Model:

y=β0+β1x1+β2x2+β3(x1x2)+εy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 (x_1 \cdot x_2) + \varepsilon

Separate equations (assuming statistical significance):

Groupx1x_1Equation
Women1y=(β0+β1)+(β2+β3)x2+εy = (\beta_0 + \beta_1) + (\beta_2 + \beta_3) x_2 + \varepsilon
Men0y=β0+β2x2+εy = \beta_0 + \beta_2 x_2 + \varepsilon

The marginal change in yy for a one‑unit increase in x2x_2 is:

  • Women: β2+β3\beta_2 + \beta_3
  • Men: β2\beta_2

If β30\beta_3 \neq 0, the slope differs by gender.

Excel output & interpretation

Using Analysis ToolPack with inputs: salary (y), gender, work experience, and gender×experience (interaction).

MetricValueInterpretation
R2R^20.92Good fit
Adjusted R2R^20.91Good, penalises extra term
FF‑test pp‑valuevery smallReject H0:β1=β2=β3=0H_0: \beta_1=\beta_2=\beta_3=0
All tt‑test pp‑values<0.05<0.05Each coefficient significant

Estimated regression equation:

y^=13450.27771.68x1+293.8x2241.6(x1x2)\hat{y} = 13450.2 - 7771.68\,x_1 + 293.8\,x_2 - 241.6\,(x_1\cdot x_2)

Specific equations:

  • Women (x1=1x_1=1):
    y^=(13450.27771.68)+(293.8241.6)x2=5678.52+52.2x2\hat{y} = (13450.2 - 7771.68) + (293.8 - 241.6)\,x_2 = 5678.52 + 52.2\,x_2

  • Men (x1=0x_1=0):
    y^=13450.2+293.8x2\hat{y} = 13450.2 + 293.8\,x_2

Interpretation: For each additional month of work experience, women’s salary increases by ₹52.2, whereas men’s salary increases by ₹293.8. The interaction term reveals a large gap in the return to experience by gender.

Exam tip: Always write out the separate group equations to interpret interaction coefficients clearly. The sign and magnitude of β3\beta_3 tell you how the slope changes for the category coded 1 relative to the baseline category (coded 0).

How interaction fits into the regression framework

flowchart LR
  A[Continuous variable x₂] --> C{Moderator x₁}
  B[Categorical variable x₁] --> C
  C --> D[Conditional slope: β₂ + β₃x₁]
  D --> E[Separate models per group]

The interaction term allows the relationship between yy and x2x_2 to depend on x1x_1 without splitting the data.

Key takeaways

  • Interaction variable = product of two IVs; still linear in coefficients.
  • Moderation variable alters the slope of another predictor.
  • With a binary moderator, interaction produces two distinct regression lines.
  • Interpret significance via tt‑tests on the interaction coefficient.
  • In the example, men’s salary grows 5.6× faster with experience than women’s (293.8 vs. 52.2).

Course Recap and Final Remarks

This section summarizes the entire Business Statistics for Entrepreneurs course — a comprehensive review of statistical methods for data-driven decision making. The central message: managers must back decisions with data analysis, not intuition alone, to quantify risk and gain competitive advantage.

Foundational Modules (1–3)

  • Module 1: Data Types & Summaries
    • Qualitative vs. quantitative data; visualization; numerical summaries (mean, median, mode for central tendency; range, standard deviation, quartiles for dispersion).
  • Module 2–3: Probability & Random Variables
    • Discrete random variables: Bernoulli, binomial, Poisson. Use probability mass function (PMF) to compute expectation, variance, cumulative/tail probabilities, and inverse calculations.
    • Continuous random variables: uniform, exponential, normal, standard normal. Probability density function (PDF) plays same role as PMF.
    • Linear combinations of random variables (especially normal). Relatives of normal: chi-square, t, F distributions — all share similar characteristics but serve specific inference purposes.

Statistical Inference

Module 4: From Sample to Population

  • Sample statistics (sample mean xˉ\bar{x}, sample variance s2s^2, sample proportion p^\hat{p}) are random variables because samples are random.
  • Their distributions are sampling distributions.
  • Central limit theorem (CLT) is the bridge: even from a single random sample we can make probabilistic statements about population parameters (μ\mu, pp, σ2\sigma^2).

Module 5: Confidence Intervals & Hypothesis Tests

  • Confidence intervals: point estimate ±\pm margin of error for μ\mu and pp; for σ2\sigma^2 a direct lower/upper bound.
  • Hypothesis tests: structure null H0H_0 and alternative HaH_a based on who makes the claim. Steps:
    1. Choose significance level α\alpha.
    2. Assume H0H_0 true (at equality), compute test statistic (follows tt, zz, or χ2\chi^2).
    3. Compute p-value (probability of Type I error).
    4. If p-value is small enough, reject H0H_0; otherwise, do not reject.
  • Both methods allow inference about μ\mu, pp, σ2\sigma^2.

Regression Modeling

Module 6: Simple Linear Regression

  • Model: y=β0+β1x+ϵy = \beta_0 + \beta_1 x + \epsilon
  • Estimated equation: y^=b0+b1x\hat{y} = b_0 + b_1 x (least squares)
  • Coefficient of determination R2R^2: proportion of variation in yy explained by the model.
  • Validate assumptions about ϵ\epsilon (homoscedasticity, normality, independence) via residual analysis; tt-test and FF-test check significance.
  • Use Excel Analysis ToolPak.

Module 7: Multiple Linear Regression

  • Model: y=β0+β1x1+β2x2++βpxp+ϵy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_p x_p + \epsilon
  • E(y)=β0+β1x1++βpxpE(y) = \beta_0 + \beta_1 x_1 + \dots + \beta_p x_p
  • Estimated: y^=b0+b1x1+b2x2++bpxp\hat{y} = b_0 + b_1 x_1 + b_2 x_2 + \dots + b_p x_p
  • Multiple coefficient of determination R2R^2; overall FF-test; individual tt-tests.
  • Issues: multicollinearity, omitted variable bias; iterative model building; residual diagnostics for outliers and influential observations.

Module 8: Categorical Variables & Interaction Effects (Final Module)

  • Extend multiple regression to include qualitative (categorical) independent variables alongside quantitative ones.
  • Least squares estimation remains unchanged; evaluation uses same R2R^2, FF-test, tt-test, residual analysis.
  • Adding categorical variables does not always improve the model — just because data exists doesn’t mean it should be included.
  • Interaction variables (product of a categorical and a quantitative variable) help model interaction effects.

Final Advice

Exam tip: The course deliberately focuses on application and interpretation over theoretical derivation. For exams, prioritize converting business questions into probability/inference questions and correctly interpreting regression output (coefficients, R2R^2, p-values).

Key takeaways

  • Decision-making without data is risky; statistics quantifies that risk.
  • Sampling distributions and the central limit theorem are the foundation for inference.
  • Confidence intervals and hypothesis tests are dual approaches for drawing conclusions about populations.
  • Regression (simple → multiple → with categoricals) is the core tool for modeling relationships.
  • Model building is iterative — add variables cautiously and validate assumptions via residual analysis.
  • Categorical variables and interactions extend regression’s power without changing fundamental procedures.

Random Variables and Discrete Probability Distributions

Introduction to Random Variables

A random variable (RV) assigns a numerical value to each outcome of a random experiment.
Think of it as a rule that converts the abstract outcome (e.g., "heads") into a number you can work with (e.g., 00).

Discrete vs. Continuous Random Variables

TypeValuesExamplePractical business example
DiscreteCountable (often integers); can be finite or countably infiniteNumber of heads in 10 coin tosses: {0,1,,10}\{0,1,\dots,10\}Number of orders from 5 sales calls, number of defective radios in a shipment of 50, number of customers at a restaurant in a day
ContinuousAny value in an interval (including fractions)Time between customer arrivals at a bank: (0,)(0,\infty)Actual fluid ounces in a “12 oz” soft‑drink can (between 11.5 and 12.5), temperature at which a chemical reaction occurs (between 100°C and 150°C)

Note: In the same setting (e.g., a bank), the number of customers arriving is a discrete RV, while the time between arrivals is a continuous RV.

Probability Mass Function (PMF)

For a discrete RV XX, the probability mass function (PMF), denoted f(x)f(x), gives the probability that XX equals exactly a particular value xx:

f(x)=P(X=x)f(x) = P(X = x)

  • f(x)0f(x) \ge 0 for all xx
  • all xf(x)=1\sum_{\text{all }x} f(x) = 1 (total probability mass = 1)

Why “mass”? Think of 1 unit of probability being distributed across the possible values — the PMF decides how much mass lands on each value.

Example: Fair die

f(x)=16,x=1,2,3,4,5,6f(x) = \frac{1}{6}, \quad x = 1,2,3,4,5,6

Plot: six bars of equal height (1/61/6).

Example: Biased die

xxf(x)f(x)
11/31/3
21/61/6
31/61/6
41/61/6
51/121/12
61/121/12
Sum1

Plot: bars of different heights (tallest at x=1x=1).

Cumulative Distribution Function (CDF) and Tail Probability

The cumulative distribution function (CDF), F(ϕ)F(\phi), gives the probability that XX is less than or equal to ϕ\phi:

F(ϕ)=P(Xϕ)=xϕf(x)F(\phi) = P(X \le \phi) = \sum_{x \le \phi} f(x)

The tail probability (complement) is:

Fˉ(x)=P(X>x)=1F(x)\bar{F}(x) = P(X > x) = 1 - F(x)

Worked example: Fair die

  • F(5)=P(X5)=16+16+16+16+16=56F(5) = P(X \le 5) = \frac{1}{6} + \frac{1}{6} + \frac{1}{6} + \frac{1}{6} + \frac{1}{6} = \frac{5}{6}
  • P(X>3)=1F(3)=136=12P(X > 3) = 1 - F(3) = 1 - \frac{3}{6} = \frac{1}{2}
  • P(even)=P(X=2,4,6)=36=12P(\text{even}) = P(X=2,4,6) = \frac{3}{6} = \frac{1}{2}
  • P(2X5)=P(X=2,3,4,5)=46=23P(2 \le X \le 5) = P(X=2,3,4,5) = \frac{4}{6} = \frac{2}{3}

Worked example: Biased die (probabilities as above)

  • P(X=2)=f(2)=16P(X=2) = f(2) = \frac{1}{6}
  • P(X5)=f(1)+f(2)+f(3)+f(4)+f(5)=13+16+16+16+112=1112P(X \le 5) = f(1)+f(2)+f(3)+f(4)+f(5) = \frac{1}{3}+\frac{1}{6}+\frac{1}{6}+\frac{1}{6}+\frac{1}{12} = \frac{11}{12}
    (Equivalently, 1f(6)=1112=11121 - f(6) = 1 - \frac{1}{12} = \frac{11}{12})

Expected Value, Variance, and Standard Deviation

Expected value E[X]E[X] is the probability‑weighted average of all possible values:

E[X]=all xxf(x)E[X] = \sum_{\text{all }x} x \cdot f(x)

  • Provides the center of the distribution.
  • It need not be a value the RV can actually take (e.g., fair die: E[X]=3.5E[X] = 3.5, yet you never roll a 3.5).

Variance Var(X)\text{Var}(X) measures the spread — the probability‑weighted average of squared deviations from the mean:

Var(X)=all x(xE[X])2f(x)\text{Var}(X) = \sum_{\text{all }x} \big(x - E[X]\big)^2 \cdot f(x)

Standard deviation σX\sigma_X is the square root of the variance (same units as X):

σX=Var(X)\sigma_X = \sqrt{\text{Var}(X)}

Worked example: Fair die

E[X]=116+216++616=216=3.5E[X] = 1\cdot\frac{1}{6} + 2\cdot\frac{1}{6} + \cdots + 6\cdot\frac{1}{6} = \frac{21}{6} = 3.5

\text{Var}(X) &= (1-3.5)^2\cdot\frac{1}{6} + (2-3.5)^2\cdot\frac{1}{6} + \cdots + (6-3.5)^2\cdot\frac{1}{6} \\[2pt] &= \frac{35}{12} \approx 2.92 \end{aligned} $$ $$ \sigma_X = \sqrt{\frac{35}{12}} \approx 1.71 $$ ### Worked example: Biased die From the PMF table above: $$ \begin{aligned} E[X] &= 1\cdot\frac{1}{3} + 2\cdot\frac{1}{6} + 3\cdot\frac{1}{6} + 4\cdot\frac{1}{6} + 5\cdot\frac{1}{12} + 6\cdot\frac{1}{12} \\ &= \frac{33}{12} = 2.75 \end{aligned} $$ $$ \begin{aligned} \text{Var}(X) &= (1-2.75)^2\cdot\frac{1}{3} + (2-2.75)^2\cdot\frac{1}{6} + (3-2.75)^2\cdot\frac{1}{6} \\ &\quad + (4-2.75)^2\cdot\frac{1}{6} + (5-2.75)^2\cdot\frac{1}{12} + (6-2.75)^2\cdot\frac{1}{12} \\ &= 2.6875 \approx 2.69 \end{aligned} $$ > **Exam tip:** For any discrete RV, always check that the probabilities sum to **1** before computing expected value or variance. > Also remember: $E[X]$ may be a number the RV never actually takes — it describes the long‑run average, not a possible outcome. **Key takeaways** - A **random variable** maps random outcomes to numbers; **discrete** RVs take countable values, **continuous** RVs take any value in an interval. - The **PMF** $f(x)$ gives $P(X=x)$ and sums to 1. - The **CDF** $F(x)$ gives $P(X\le x)$; tail probability $P(X>x) = 1-F(x)$. - **Expected value** $E[X] = \sum x \cdot f(x)$ is the probability‑weighted mean. - **Variance** $\text{Var}(X) = \sum (x-E[X])^2 f(x)$; **standard deviation** = $\sqrt{\text{Var}(X)}$. - Both fair and biased dice illustrate that probabilities change the center and spread, even though the possible values stay the same. ### Key Concepts: PMF, CDF, Tail Probability, Expectation, Variance For a discrete random variable $X$: - **Probability Mass Function (PMF)**: $f(x) = P(X = x)$. Non‑negative and sums to 1 over all $x$. - **Cumulative Distribution Function (CDF)**: $F(x) = P(X \leq x) = \sum_{t \leq x} f(t)$. - **Tail probability**: $\bar{F}(x) = P(X > x) = 1 - F(x)$. - **Expected value**: $\mu = E[X] = \sum x \cdot f(x)$. - **Variance**: $\sigma^2 = \text{Var}(X) = \sum (x - \mu)^2 f(x) = E[X^2] - \mu^2$; standard deviation $\sigma = \sqrt{\sigma^2}$. ### From Data to PMF When the true PMF is unknown, estimate it using **relative frequencies** from observed data:

f(x) \approx \frac{\text{number of occurrences of } x}{\text{total observations}}.

This gives a valid PMF because frequencies are non‑negative and sum to 1. --- ### Example 1: Biased Die (Reviewing PMF, CDF, Tail) A biased die has PMF:

f(1)=f(2)=f(3)=f(4)=\frac{1}{6},\quad f(5)=f(6)=\frac{1}{12}.

- **Probability of even value**: $P(\text{even}) = f(2)+f(4)+f(6) = \frac{1}{6}+\frac{1}{6}+\frac{1}{12} = \frac{5}{12}$. - **Probability of values between 2 and 5 inclusive**: $P(2 \leq X \leq 5) = f(2)+f(3)+f(4)+f(5) = \frac{1}{6}+\frac{1}{6}+\frac{1}{6}+\frac{1}{12} = \frac{7}{12}$. - **Tail probability $P(X > 3)$**: $P(X > 3) = f(4)+f(5)+f(6) = \frac{1}{6}+\frac{1}{12}+\frac{1}{12} = \frac{1}{3}$, or $1 - F(3) = 1 - (f(1)+f(2)+f(3)) = 1 - \frac{1}{2} = \frac{1}{3}$. **Approach to any question**: 1. Translate the question into an event. 2. Identify the range of $x$ values that satisfy the event. 3. Sum the corresponding $f(x)$. --- ### Example 2: Defective Pumps at Kirloskar Factory **Setup**: $X$ = number of defective pumps per day. Data from 200 days: | $x$ (defects) | Days | Estimated $f(x)$ | |:---:|:---:|:---:| | 0 | 80 | 0.40 | | 1 | 50 | 0.25 | | 2 | 40 | 0.20 | | 3 | 10 | 0.05 | | 4 | 20 | 0.10 | | $\geq 5$ | 0 | 0.00 | **Questions answered using the PMF**: - $P(\text{exactly 2}) = f(2) = 0.20$. - $P(\leq 3) = f(0)+f(1)+f(2)+f(3) = 0.40+0.25+0.20+0.05 = 0.90$. - **Expected value**:

E[X] = \sum x f(x) = 0(0.40) + 1(0.25) + 2(0.20) + 3(0.05) + 4(0.10) = 1.2 \text{ defective pumps/day}.

Varianceandstandarddeviation:- **Variance and standard deviation**:

\begin{aligned} \text{Var}(X) &= (0-1.2)^2(0.40) + (1-1.2)^2(0.25) + (2-1.2)^2(0.20) + (3-1.2)^2(0.05) + (4-1.2)^2(0.10) \ &= 1.66, \ \sigma &= \sqrt{1.66} \approx 1.29. \end{aligned}

> **Exam tip**: The steps are identical for any discrete distribution: obtain $f(x)$ (here from data), then compute probabilities via summation, expectation as a weighted sum, and variance as the weighted squared deviation. --- ### Example 3: Late Take-offs at Nagpur Airport **Setup**: $X$ = number of planes taking off late between 9 pm and 11 pm. Data from 30 days: | $x$ (late planes) | Days | Estimated $f(x)$ | |:---:|:---:|:---:| | 0 | 3 | 0.10 | | 1 | 6 | 0.20 | | 2 | 9 | 0.30 | | 3 | 6 | 0.20 | | 4 | 6 | 0.20 | | $\geq 5$ | 0 | 0.00 | The PMF is derived from the given statements: $f(0)=0.10$, $f(1)=0.20$, $P(\geq 2)=0.70$, $P(\leq 3)=0.80$, $E[X]=2.20$, $\text{Var}(X)=1.56$. **Questions answered**: - $P(\text{2 or more}) = 1 - f(0) - f(1) = 1 - 0.10 - 0.20 = 0.70$. - $P(\text{4 or less}) = F(3) = f(0)+f(1)+f(2)+f(3) = 0.10+0.20+0.30+0.20 = 0.80$. - **Expected value**:

E[X] = 0(0.10) + 1(0.20) + 2(0.30) + 3(0.20) + 4(0.20) = 2.20 \text{ late planes}.

Varianceandstandarddeviation:- **Variance and standard deviation**:

\begin{aligned} E[X^2] &= 0^2(0.10) + 1^2(0.20) + 2^2(0.30) + 3^2(0.20) + 4^2(0.20) = 6.40, \ \text{Var}(X) &= 6.40 - (2.20)^2 = 1.56, \ \sigma &= \sqrt{1.56} \approx 1.25. \end{aligned}

--- **Key Takeaways** - **PMF from data**: relative frequencies estimate probabilities; sum to 1. - **Calculating probabilities**: add $f(x)$ for the event’s $x$ range; use $1-F(x)$ for tail probabilities. - **Expectation**: weighted average $\sum x f(x)$. - **Variance & std dev**: weighted average of squared deviations; $\sigma$ gives spread in original units. - **Procedure is universal** – same steps for any discrete random variable once $f(x)$ is known. ### Linear Combinations of Random Variables A **linear combination** of random variables is a new random variable formed by multiplying each original variable by a constant and summing them: $Y = a_1 X_1 + a_2 X_2 + \dots + a_n X_n$. Why does this matter? Because quantities like total cost, total profit, portfolio returns, and sample averages are all linear combinations. Understanding their **expectation** and **variance** lets us predict average outcomes and measure risk. ### Linear Transformation of a Single Variable If $Y = aX + b$ (a linear function of a single random variable $X$), then - **Expectation**: $E(Y) = a\,E(X) + b$ *Intuition*: scaling and shifting the variable scales and shifts its mean. - **Variance**: $\operatorname{Var}(Y) = a^2 \operatorname{Var}(X)$ *Intuition*: shifting ($+b$) does not affect spread; scaling ($a$) multiplies spread by $a^2$. > **Example 1: Temperature conversion** > Ideal frying temperature in Celsius: $X$ with $E(X)=160$, $\operatorname{sd}(X)=5$. Convert to Fahrenheit: $Y = \frac{9}{5}X + 32$. > $$E(Y)=\frac{9}{5}\cdot160+32=320,\quad \operatorname{Var}(Y)=\left(\frac{9}{5}\right)^2\cdot25=81,\quad \operatorname{sd}(Y)=9.$$ > **Example 2: Real estate price (rupees to dollars)** > Price in rupees: $X$ with $E(X)=36,\!000$, $\operatorname{sd}(X)=9,\!600$. Exchange rate $1\,\text{USD}=80\,\text{INR}$ → $Y = \frac{1}{80}X + 0$. > $$E(Y)=\frac{36,\!000}{80}=450,\quad \operatorname{Var}(Y)=\frac{1}{80^2}\cdot9,\!600^2=14,\!400,\quad \operatorname{sd}(Y)=120.$$ ### Sum of Two Random Variables For $Y = X_1 + X_2$: - **Expectation**: $E(Y) = E(X_1) + E(X_2)$ (always additive). - **Variance**: $\operatorname{Var}(Y) = \operatorname{Var}(X_1) + \operatorname{Var}(X_2) + 2\,\operatorname{Cov}(X_1, X_2)$ where $\operatorname{Cov}(X_1, X_2) = \rho_{12}\,\sigma_1\sigma_2$. If $X_1$ and $X_2$ are **independent**, then $\rho_{12}=0$ and: $$\operatorname{Var}(Y) = \operatorname{Var}(X_1) + \operatorname{Var}(X_2).$$ > **Example: Store sales** > Store A: $E(X)=7,\!000$, $\operatorname{sd}(X)=1,\!500$ > Store B: $E(Y)=8,\!000$, $\operatorname{sd}(Y)=2,\!000$ > Independent. > - Total sales $S = X+Y$: $E(S)=15,\!000$, $\operatorname{Var}(S)=1,\!500^2+2,\!000^2=6,\!250,\!000$, $\operatorname{sd}(S)=2,\!500$. > - Difference $D = X-Y$: $E(D)=-1,\!000$, $\operatorname{Var}(D)=1,\!500^2+2,\!000^2=6,\!250,\!000$, $\operatorname{sd}(D)=2,\!500$ (same variance because $(-1)^2=1$). > **Key insight**: For independent variables, the variance of a difference is the *sum* of variances, not the difference. ### General Linear Combination Let $Y = a_1 X_1 + a_2 X_2 + \dots + a_n X_n$. Then: - **Expectation** (always): $$E(Y) = a_1 E(X_1) + a_2 E(X_2) + \dots + a_n E(X_n).$$ - **Variance** (if independent): $$\operatorname{Var}(Y) = a_1^2 \operatorname{Var}(X_1) + a_2^2 \operatorname{Var}(X_2) + \dots + a_n^2 \operatorname{Var}(X_n).$$ - **Variance** (if not independent): add pairwise covariance terms: $$\operatorname{Var}(Y) = \sum_{i=1}^n a_i^2 \operatorname{Var}(X_i) + 2\sum_{i<j} a_i a_j \operatorname{Cov}(X_i, X_j).$$ ### Sum and Difference of Two Independent Identical Variables If $X_1$ and $X_2$ are independent, $E(X_1)=E(X_2)=\mu$, $\operatorname{Var}(X_1)=\operatorname{Var}(X_2)=\sigma^2$, then: | Variable | Expectation | Variance | |----------|-------------|----------| | $Y_1 = X_1 + X_2$ | $2\mu$ | $2\sigma^2$ | | $Y_2 = X_1 - X_2$ | $0$ | $2\sigma^2$ | Both have the same variance — the sign of the constant does not affect the squared scaling. ### Portfolio of Two Stocks (Correlated) Shweta Kulkarni invests in Siemens ($X$) and Trent ($Y$). $E(X)=3\%$, $\operatorname{sd}(X)=1.5\%$; $E(Y)=5\%$, $\operatorname{sd}(Y)=3\%$; correlation $\rho=-0.6$. Portfolio return: $P = wX + (1-w)Y$, where $w$ = fraction in Siemens. **Formulas**: $$E(P) = w\cdot3 + (1-w)\cdot5$$ $$\operatorname{Var}(P) = w^2(1.5^2) + (1-w)^2(3^2) + 2w(1-w)(-0.6)(1.5)(3)$$ For $w=0.5$ (equal split): $$E(P)=4\%,\quad \operatorname{Var}(P)=1.4625,\quad \operatorname{sd}(P)\approx1.21\%.$$ **Exploring other splits** (partial table from lecture): | $w$ | $E(P)$ | $\operatorname{sd}(P)$ | |-----|--------|------------------------| | 0.5 | 4.0% | 1.21% | | 0.9 | 3.2% | 1.19% | The 90-10 portfolio is **dominated** by the 50-50 portfolio: same risk but lower return. After removing dominated choices, the remaining set of portfolios are **Pareto optimal** — each offers a different risk-return trade-off. Shweta’s optimal split depends on her risk appetite. > **Exam tip**: Negative correlation reduces portfolio variance. Even without correlation, diversification often lowers risk relative to a single asset. ### Sum of $n$ Independent Identical Variables Let $X_1, X_2, \dots, X_n$ be **i.i.d.** with mean $\mu$ and variance $\sigma^2$. Define $S = \sum_{i=1}^n X_i$. Then: $$E(S) = n\mu,\qquad \operatorname{Var}(S) = n\sigma^2.$$ > **Example: Luggage weight** > Per passenger: $\mu=30$ kg, $\sigma=3$ kg, $n=81$ independent. > $E(\text{total})=81\cdot30=2,\!430$ kg, $\operatorname{sd}(\text{total})=\sqrt{81\cdot9}=27$ kg. ### Average of $n$ Independent Identical Variables Define $\bar{X} = \frac{1}{n}\sum_{i=1}^n X_i$ (the **sample mean**). Then: $$E(\bar{X}) = \mu,\qquad \operatorname{Var}(\bar{X}) = \frac{\sigma^2}{n}, \qquad \operatorname{sd}(\bar{X}) = \frac{\sigma}{\sqrt{n}}.$$ > **Example: Exam scores** > Per student: $\mu=70$, $\sigma=20$, $n=25$ independent. > $E(\bar{X})=70$, $\operatorname{Var}(\bar{X})=\frac{400}{25}=16$, $\operatorname{sd}(\bar{X})=4$. > **Key insight**: Averaging reduces variance — the more data points, the more precise the estimate of the mean. ### Coefficient of Variation The **coefficient of variation (CV)** is a standardized measure of dispersion: $$\text{CV} = \frac{\text{standard deviation}}{\text{mean}}.$$ It expresses risk relative to the average — useful for comparing variability across different scales. - Luggage total: $\text{CV} = \frac{27}{2430} \approx 0.011 = 1\%$. - Exam average: $\text{CV} = \frac{4}{70} \approx 0.057 = 5.7\%$. **Key takeaways** - $E(aX+b) = aE(X)+b$; $\operatorname{Var}(aX+b) = a^2\operatorname{Var}(X)$. - For sums: expectations add always; variances add only if independent; with dependence, include covariance. - Portfolio return variance is reduced by negative correlation between assets. - The sample mean $\bar{X}$ has variance $\sigma^2/n$ — a foundation for statistical inference. - **Coefficient of variation** standardizes dispersion for comparing risk across different means. ### Recap: Discrete Random Variables A **discrete random variable** $X$ takes only integer values (e.g., 0, 1, 2, …). Its behaviour is fully described by the **probability mass function (PMF)** $f(x) = P(X = x)$. From the PMF we derive: - **Cumulative distribution function (CDF)**: $F(x) = P(X \leq x) = \sum_{t \leq x} f(t)$ - **Expectation (mean)**: $E[X] = \sum_{x} x \, f(x)$ - **Variance**: $\text{Var}(X) = \sum_{x} (x - E[X])^2 \, f(x)$ - **Standard deviation**: $\text{SD}(X) = \sqrt{\text{Var}(X)}$ ### Linear Combinations of Random Variables For constants $a_1, a_2, \ldots, a_n$ and random variables $X_1, X_2, \ldots, X_n$, define $Y = a_1 X_1 + a_2 X_2 + \cdots + a_n X_n$. Then: - **Expectation**: $E[Y] = a_1 E[X_1] + a_2 E[X_2] + \cdots + a_n E[X_n]$ - **Variance**: $\text{Var}(Y) = a_1^2 \text{Var}(X_1) + a_2^2 \text{Var}(X_2) + \cdots + a_n^2 \text{Var}(X_n) + \text{extra terms}$ The “extra terms” are all pairwise covariances: $2 a_i a_j \text{Cov}(X_i, X_j)$. If the $X_i$ are **independent**, all covariances are zero and the variance simplifies to the sum of the squared-coefficient times variances. > **Key insight**: Linearity of expectation always holds; variance only simplifies under independence. **Key takeaways** - PMF gives probabilities for each outcome; CDF accumulates them. - $E[X]$ is the probability‑weighted average; $\text{Var}(X)$ measures spread around that average. - For linear combinations: expectation is linear, variance adds covariances (which vanish under independence). --- ### Bernoulli Random Variable A **Bernoulli random variable** $Y$ models an experiment with exactly two outcomes: **success** ($Y=1$) or **failure** ($Y=0$). Let the success probability be $p$, and $q = 1-p$ the failure probability. The **PMF** is:

f(y) = \begin{cases} p, & y = 1\ 1-p = q, & y = 0 \end{cases}

### Why it matters Before studying the Binomial distribution (which counts successes in multiple trials), we must master the Bernoulli – it is the building block. Many real‑world events can be classified as success/failure: | Context | Success (Y=1) | Failure (Y=0) | $p$ | |---|---|---|---| | Coin toss (fair) | Heads | Tails | 0.5 | | Sales call | Customer purchases | No purchase | given | | Customer survey | Satisfied | Not satisfied | given | | Daily demand > 10 | Demand > 10 | Demand ≤ 10 | given | ### Expectation and Variance Using the definitions for a discrete random variable:

E[Y] = (1 \times p) + (0 \times q) = p

\text{Var}(Y) = (1-p)^2 \cdot p + (0-p)^2 \cdot q = p q (p + q) = p q

\text{SD}(Y) = \sqrt{p q}

> **Exam tip**: The expectation of a Bernoulli is simply $p$ – the proportion of successes. Its variance is $p(1-p)$; memorise these two formulas. ### Worked Example: Biased Die from the Lecture The biased die has probabilities $P(1)=\frac{1}{6}, P(2)=\frac{1}{6}, P(3)=\frac{1}{6}, P(4)=\frac{1}{6}, P(5)=\frac{1}{6}, P(6)=\frac{1}{6}$? (The transcript says “different probabilities” but only gives $p=1/6$ for success of ≥5. We use the given number: success = outcome ≥5 with $p=1/6$.) - Success: die shows 5 or 6 → $p = \frac{1}{6}$ - Failure: die shows 1-4 → $q = \frac{5}{6}$

E[Y] = \frac{1}{6}, \quad \text{Var}(Y) = \frac{1}{6}\cdot\frac{5}{6} = \frac{5}{36}, \quad \text{SD}(Y) = \frac{\sqrt{5}}{6}

### Examples from Earlier Contexts In each case the Bernoulli is defined by partitioning outcomes of a known discrete distribution: | Context | Success condition | $p$ | $E[Y]=p$ | $\text{Var}(Y)=p(1-p)$ | |---|---|---|---|---| | Unbiased die | ≤ 2 | $1/3$ | $1/3$ | $2/9 \approx 0.222$ | | Biased die | ≥ 5 | $1/6$ | $1/6$ | $5/36 \approx 0.139$ | | Defective pumps (Sangli) | ≤ 1 defective | $0.65$ | $0.65$ | $0.65 \times 0.35 = 0.2275$ | | Late planes (Sonegaon) | ≤ 2 late | $0.6$ | $0.6$ | $0.6 \times 0.4 = 0.24$ | | Insurance call (Priya) | Purchase | $0.2$ | $0.2$ | $0.2 \times 0.8 = 0.16$ | | Star day (Baburao) | Sales > ₹10,000 | $0.3$ | $0.3$ | $0.3 \times 0.7 = 0.21$ | ### How to Create a Bernoulli from Any Discrete Random Variable Any discrete random variable can be reduced to a Bernoulli by grouping outcomes into two categories. The examples above show exactly this: for the number of defective pumps, “≤1” becomes success and “≥2” failure, preserving the original probabilities. **Key takeaways** - Bernoulli has two outcomes: $Y=1$ (success) with $p$, $Y=0$ (failure) with $q=1-p$. - $E[Y] = p$, $\text{Var}(Y) = p q$ – derived directly from the definitions. - It is the foundation for the Binomial distribution (multiple independent Bernoulli trials). ### Binomial Random Variables and its Distribution The **binomial random variable** counts the number of successes in a fixed number of independent **Bernoulli trials**. Intuitively: if you flip a coin 10 times, how many heads do you get? That count is a binomial random variable. ### Binomial Experiment A **binomial experiment** has four properties: 1. A sequence of $n$ **identical** and **independent** trials. 2. Each trial has exactly two outcomes: **success** (probability $p$) and **failure** (probability $q = 1-p$). 3. The probability of success $p$ is constant across all trials. 4. The random variable $Y$ = number of successes in $n$ trials. | Parameter | Meaning | Example (coin) | |-----------|---------|----------------| | $n$ | Fixed number of trials | 10 tosses | | $p$ | Success probability per trial | $p$ = P(heads) | | $Y$ | Observed count of successes | # heads in 10 tosses | > `Exam tip:` The binomial random variable **only counts successes** – it ignores the order in which they occur. All arrangements of $y$ successes and $n-y$ failures are grouped into the single outcome $Y=y$. ### Probability Mass Function (PMF) The **PMF** of $Y$ gives the probability of exactly $y$ successes: $$ P(Y = y) = \binom{n}{y} \, p^{\,y} \, (1-p)^{\,n-y}, \quad y = 0,1,\dots,n $$ where $\displaystyle \binom{n}{y} = \frac{n!}{y!\,(n-y)!}$ counts the number of ways to arrange $y$ successes among $n$ trials. #### Why this formula works - $p^{\,y}$ : probability of $y$ successes. - $(1-p)^{\,n-y}$ : probability of $n-y$ failures. - $\binom{n}{y}$ : number of distinct sequences containing exactly $y$ successes. ### Examples from the lecture | Experiment | Definition of success | $p$ | $n$ | $Y$ range | |------------|----------------------|-----|-----|-----------| | 10 coin tosses | Heads | $p$ | 10 | 0–10 | | 15 tosses of a fair die | $\{2\text{ or less}\}$ | $1/3$ | 15 | 0–15 | | 10 tosses of a biased die | $\{5\text{ or more}\}$ | $1/6$ | 10 | 0–10 | ### Expectation and Variance - **Expectation**: $E[Y] = n\,p$ - **Variance**: $\text{Var}(Y) = n\,p\,q = n\,p\,(1-p)$ - **Standard deviation**: $\sqrt{n\,p\,(1-p)}$ *Intuition*: The binomial random variable is the sum of $n$ independent Bernoulli($p$) random variables (each with mean $p$ and variance $p(1-p)$). Hence the mean and variance simply add up. #### Worked example (fair die) For $n=15$, $p=1/3$: $$ E[Y] = 15 \times \frac{1}{3} = 5 $$ $$ \text{Var}(Y) = 15 \times \frac{1}{3} \times \frac{2}{3} = \frac{10}{3} \approx 3.33 $$ $$ \text{SD}(Y) = \sqrt{\frac{10}{3}} \approx 1.83 $$ This means over many sets of 15 rolls, you would expect about 5 successes (rolling ≤2), give or take about 1.8. ### Key takeaways - A **binomial random variable** requires: fixed $n$, independent trials, two outcomes, constant $p$. - PMF: $\displaystyle P(Y=y) = \binom{n}{y} p^y (1-p)^{n-y}$. - Mean $= np$; variance $= np(1-p)$. - The binomial **counts** successes – it does not track which trials succeeded. - Common pitfalls: using binomial when trials are **not independent** (e.g., sampling without replacement) – use hypergeometric instead. > `Exam tip:` The binomial PMF sums to 1: $\sum_{y=0}^n \binom{n}{y} p^y (1-p)^{n-y} = 1$. This is the binomial theorem in action. Memorise the mean and variance formulas – they appear in nearly every exam problem. ### Examples of Binomial Distributions The **binomial distribution** models the number of successes in a fixed number of independent trials, each with the same success probability $p$. The examples that follow show how to compute probabilities, expectations, and perform inverse calculations using a spreadsheet. ### Key formulas (for binomial random variable $Y \sim \text{Bin}(n,p)$) - PMF: $P(Y=y) = \binom{n}{y} p^y (1-p)^{n-y}$ - Expected value: $\mu = E[Y] = np$ - Variance: $\sigma^2 = np(1-p)$ - Standard deviation: $\sigma = \sqrt{np(1-p)}$ ### Excel: `BINOM.DIST` function | Argument | Meaning | Example | |----------|---------|---------| | `y` | number of successes | cell reference | | `n` | number of trials | 10 | | `p` | probability of success per trial | 1/6 | | `cumulative` | `FALSE` → PMF; `TRUE` → CDF | `FALSE` gives $P(Y=y)$ | A template table lists $y$ from $0$ to $n$, then computes $P(Y=y)$ (PMF), $P(Y \le y)$ (CDF), and $P(Y \ge y)$ (complement) for each $y$. The spreadsheet also automatically updates the mean, variance, and standard deviation when $n$ or $p$ changes. --- ### Example 1: Biased die (10 tosses, success = 5 or more) - **Trials:** $n = 10$ - **Success:** outcome $\ge 5$ on a die $\Rightarrow p = 1/6$ - **Failure:** outcome $\le 4$ $\Rightarrow q = 5/6$ - **Random variable:** $Y$ = number of successes in 10 tosses ### Computed parameters - Mean: $E[Y] = np = 10 \times \frac{1}{6} \approx 1.67$ - Variance: $npq = 10 \times \frac{1}{6} \times \frac{5}{6} \approx 1.39$ - Standard deviation: $\sqrt{1.39} \approx 1.18$ ### Probability of at least 3 successes $P(Y \ge 3) = \sum_{y=3}^{10} P(Y=y)$ From the spreadsheet, summing the PMF values for $y=3,4,\dots,10$ gives: $$P(Y \ge 3) \approx 0.225$$ ### Inverse probability: find $p$ such that $P(Y \ge 3) \ge 0.5$ Starting from $p=1/6$, the probability $P(Y \ge 3)$ is $0.225$. By incrementally increasing $p$ in the spreadsheet cell, the desired probability reaches $0.5$ when $p \approx 0.259$. - $p = 0.18 \rightarrow P(Y \ge 3) \approx 0.263$ - $p = 0.20 \rightarrow 0.322$ - $p = 0.24 \rightarrow 0.44$ - $p = 0.25 \rightarrow 0.474$ - $p = 0.259 \rightarrow 0.501$ The **goal seek** feature in Excel automates this. > **Exam tip:** An *inverse probability* problem gives you a target probability and asks for the parameter $p$ (or sometimes $n$) that produces it. The spreadsheet approach (trial and error or goal seek) is efficient but on an exam you may need to reason qualitatively or use a calculator. --- ### Example 2: Kedar Apte’s pump defects (14 days, success = day with ≤1 defect) - **Trials:** $n = 14$ independent days - **Success:** day with one or fewer defective pumps $\Rightarrow p = 0.65$ - **Failure:** day with two or more defects $\Rightarrow q = 0.35$ - **Random variable:** $Y$ = number of success days in 14 days ### Computed parameters - Mean: $E[Y] = 14 \times 0.65 = 9.1$ - Standard deviation: $\sqrt{14 \times 0.65 \times 0.35} \approx 1.78$ ### Probability of at least 10 success days $P(Y \ge 10) = \sum_{y=10}^{14} P(Y=y)$ From the spreadsheet: | $y$ | $P(Y=y)$ | |-----|----------| | 10 | 0.202 | | 11 | 0.137 | | 12 | 0.069 | | 13 | 0.023 | | 14 | 0.002 | $$P(Y \ge 10) \approx 0.423$$ ### Inverse probability: find $p$ such that $P(Y \ge 10) \ge 0.5$ Current $p=0.65$ gives $P(Y \ge 10)=0.423$. Increase $p$: - $p = 0.66 \rightarrow 0.454$ - $p = 0.67 \rightarrow 0.486$ - $p = 0.68 \rightarrow 0.519$ Thus a success probability of approximately $0.675$ (between 0.67 and 0.68) yields $P(Y \ge 10)$ just over $0.5$. --- ### How the spreadsheet approach works (diagram) ```mermaid flowchart LR A[Set n, p in cells] --> B[Compute mean, variance, σ automatically] B --> C[Fill y = 0..n] C --> D[Compute PMF = BINOM.DIST(y,n,p,FALSE)] C --> E[Compute CDF = BINOM.DIST(y,n,p,TRUE)] C --> F[Compute P(Y≥y) = 1 - CDF + PMF] F --> G[Answer probability questions directly] G --> H{Inverse?} H -->|Yes| I[Vary p until target probability reached] I --> G H -->|No| J[Done] ``` --- **Key takeaways** - The binomial distribution is fully determined by $n$ and $p$; all probabilities, mean, and variance follow. - Spreadsheet templates (with `BINOM.DIST`) simplify repeated calculations and allow quick parameter sensitivity analysis. - An **inverse probability** problem fixes a tail probability and solves for $p$ (or $n$) – often by trial and error or goal seek. - Both examples illustrate the same workflow: define success → set $n$ and $p$ → compute probabilities → answer questions about expectation, standard deviation, and tail events. ### Binomial Distribution – Examples A **binomial random variable** $Y$ counts the number of successes in $n$ independent identical **Bernoulli** trials, each with success probability $p$ (fail probability $q=1-p$). - **PMF:** $\displaystyle P(Y=y) = \binom{n}{y} p^y q^{n-y}, \quad y=0,1,\dots,n$ - **Mean:** $\mu = np$ - **Variance:** $\sigma^2 = npq$ In practice, cumulative probabilities are obtained from a spreadsheet or binomial tables. --- ### Example 1 – Mangesh Nadkarni (Plane Delays) - Success = “day with ≤2 delays” → $p=0.6$, $q=0.4$. - Trials: $n=30$ independent days. - $Y$ = # of success days. | Event | Probability | Calculation | |-------|-------------|-------------| | At least 18 successes | $P(Y \ge 18)=0.578$ | Sum $P(Y=18)$ through $P(Y=30)$ | | At most 10 failures $\iff$ at least 20 successes | $P(Y \ge 20)=0.291$ | Sum $P(Y=20)$ through $P(Y=30)$ | | Between 15 and 25 successes (inclusive) | $P(15 \le Y \le 25)=0.901$ | Sum $P(Y=15)$ through $P(Y=25)$ | --- ### Example 2 – Priya (Insurance Calls) - Success = “call leads to purchase” → $p=0.2$, $q=0.8$. - Trials: $n=12$ calls per day. - $Y$ = # of successes. **Expected number of successes:** $\mu = np = 12 \times 0.2 = 2.4$. **Standard deviation:** $\sigma = \sqrt{npq} = \sqrt{12 \times 0.2 \times 0.8} \approx 1.39$. | Event | Probability | Interpretation | |-------|-------------|----------------| | At least 6 successes (≥50% conversion) | $P(Y \ge 6)=0.019$ | Very low chance of a “good” day | | At most 3 successes | $P(Y \le 3)=0.795$ | ~80% chance of “bad” day (≤25% conversion) | --- ### Example 3 – Baburao (Star Days) - Success = “sales >10 000” → $p=0.3$, $q=0.7$. - Trials: $n=10$ days. - $Y$ = # of star days. **Expected star days:** $\mu = np = 10 \times 0.3 = 3$. | Event | Probability | |-------|-------------| | At most 3 star days | $P(Y \le 3)=0.65$ | | Between 3 and 6 star days (inclusive) | $P(3 \le Y \le 6)=0.607$ (or $0.989 - 0.233 = 0.606$ by subtraction) | --- ### Redefining Success – The Critical Pitfall The same problem context can require **different** definitions of “success”. Always re‑identify $p$ and $n$ for each question. **Example – Kedar Apte (Defective Pumps)** Original success: “≤1 defect per day” → $p=0.65$. But new question: “at least 7 days with **no** defects” → success = “0 defects” → $p=0.4$ (from the distribution). - $n=14$, $P(Y \ge 7)=0.308$. Another question: “at most 3 days with **≥3 defects**” → success = “≥3 defects” → $p=0.15$. - $n=7$, $P(Y \le 3)=0.988$. Yet another: “at most one defect on **all** 14 days” → success = “≤1 defect” ($p=0.65$), but event is $Y=14$. - $P(Y=14)=0.002$. > **Exam tip:** Never carry forward a previous $p$ without rechecking what “success” means in the current question. The binomial calculation is mechanical; the hard part is mapping the business question to the correct $n$ and $p$. --- ### More Complex Examples – Mangesh Nadkarni (Plane Delays Revisited) Based on historical data for late planes (table given in lecture, probabilities assumed known): | Question | Success definition | $p$ | $n$ | Event | Probability | |----------|-------------------|-----|-----|-------|-------------| | At least 15 days with ≤1 plane late | ≤1 plane late | $0.2+0.1=0.3$ | 30 | $Y\ge 15$ | $0.017$ | | At most 5 days with exactly 4 planes late | exactly 4 planes late | $0.2$ | 10 | $Y\le 5$ | $0.944$ | | Exactly 15 days with ≤2 planes late | ≤2 planes late | $0.6$ | 30 | $Y=15$ | $0.078$ | The probability of ≥15 successes with $p=0.3$ is low; the manager is optimistic. --- ### Divide-and-Conquer Procedure ```mermaid flowchart TD A[Read question] --> B{Define success event} B --> C[Find success probability p <br>from given data] C --> D[Set number of trials n] D --> E{Translate question into <br>event on Y (≥, ≤, =, range)} E --> F[Compute using binomial formula <br>or spreadsheet] F --> G[Interpret probability in context] ``` **Key takeaways** - Binomial distribution models counts of successes in a fixed number of independent Bernoulli trials with constant $p$. - The formulas $P(Y=y)=\binom{n}{y}p^y q^{n-y}$, $\mu=np$, $\sigma^2=npq$ are the core tools. - The most common errors are misidentifying $p$ (success definition) and $n$ (number of trials). Always start by clarifying these. - Use complement or subtraction tricks (e.g., $P(Y\le a) = 1-P(Y\ge a+1)$) when helpful, but spreadsheet sums are straightforward. - Cumulative probabilities (at most, at least, between) are the most frequent exam questions – practice translating business language into probability events. ### Recap of Binomial Distribution A **binomial experiment** consists of a sequence of identical and independent trials. Each trial has exactly two outcomes — **success** (probability $p$) and **failure** (probability $q = 1-p$). The probability $p$ remains constant across trials. The **binomial random variable** $Y$ counts the number of successes in $n$ such trials. Equivalently, it is the sum of $n$ **identical and independently distributed (IID)** **Bernoulli** random variables. If any assumption fails — e.g., success probabilities change or trials are dependent — the experiment is no longer binomial. In practice, other discrete distributions are then used to model the situation. **Key takeaways** - Binomial: fixed $n$, constant $p$, independence, two outcomes per trial. - $Y \sim \text{Binomial}(n,p)$ with PMF $P(Y=y) = \binom{n}{y} p^y q^{n-y}$. - $E[Y] = np$, $Var[Y] = npq$. - When assumptions break, alternative distributions are needed. ### Poisson Distribution The **Poisson random variable** counts the number of occurrences of an event over a specified interval of **time** or **space**. It is a discrete distribution (values $0,1,2,\dots$) and is often used to model random arrivals, defects, or counts that occur at a constant average rate. ### Intuition and Examples - Number of customers arriving at a store in 30 minutes. - Number of phone calls at a call center in 15 minutes. - Number of defects in one kilometre of highway. - Number of keyword occurrences on a page of text. ### Probability Mass Function (PMF) Let $Y$ be Poisson with parameter $\Lambda > 0$ (the mean number of events in the interval). The probability of exactly $y$ events is: $$ P(Y=y) = \frac{e^{-\Lambda}\,\Lambda^y}{y!}, \quad y = 0,1,2,\dots $$ $e \approx 2.71828$ is the base of the natural logarithm. > Exam tip: Poisson has only **one parameter** $\Lambda$, unlike binomial’s two ($n,p$). ### Expectation and Variance For a Poisson random variable $Y$: $$ E[Y] = \Lambda, \qquad Var[Y] = \Lambda $$ Thus the mean equals the variance — a unique property of the Poisson distribution. The standard deviation is $\sqrt{\Lambda}$. ### Properties of a Poisson Process A **Poisson process** is a stochastic process where events occur randomly over time, and the number of events in any interval of length $t$ follows a Poisson distribution. The process satisfies: 1. **Stationarity** – The probability of a given number of events in an interval depends only on the interval’s length, not its start time. 2. **Independence** – The occurrence or non‑occurrence of events in disjoint intervals are independent. 3. **Mean equals variance** – The number of events in any interval has identical mean and variance. The **time between successive events** in a Poisson process follows an **exponential distribution** (a continuous distribution covered later). ### Parameter as a Rate When interest lies in the number of events over an interval of length $t$, the Poisson parameter becomes $\Lambda = \lambda t$, where $\lambda$ is the **rate** (events per unit time). Then $Y$ – the number of events in time $t$ – is Poisson with mean $\lambda t$: $$ P(Y=y) = \frac{e^{-\lambda t}\,(\lambda t)^y}{y!} $$ ### Worked Example: Call Centre Arrivals Suppose customers call a help desk at a rate of $\lambda = 10$ per hour. - In a $t = 2$‑hour period, the number of calls $Y$ is Poisson with $\Lambda = 10 \times 2 = 20$. $E[Y] = 20$, $Var[Y] = 20$. - In a $t = 30$‑minute ($0.5$ hour) period, the number of calls $Z$ is Poisson with $\Lambda = 10 \times 0.5 = 5$. $E[Z] = 5$, $Var[Z] = 5$. The PMF in each case uses the corresponding $\Lambda$. ### Connection to the Mathematician The distribution is named after **Baron Siméon Denis Poisson** (1781–1840), a French mathematician and physicist. **Key takeaways** - Poisson models counts of rare events over time or space. - PMF: $P(Y=y) = e^{-\Lambda}\Lambda^y / y!$, with single parameter $\Lambda$. - $E[Y] = Var[Y] = \Lambda$. - For a process with rate $\lambda$ over interval $t$, parameter $\Lambda = \lambda t$. - Key properties: stationarity, independence, mean=variance. ### Poisson Distribution: Examples and Excel Implementation The **Poisson distribution** models the number of events occurring in a fixed interval of time (or space) when events happen at a constant average rate and independently. The distribution has a single parameter $\lambda$ (also denoted as the mean and variance). The **probability mass function (PMF)** is: $$P(Y = y) = \frac{e^{-\lambda} \lambda^y}{y!}, \quad y = 0, 1, 2, \dots$$ ### Setting Up Poisson in Excel Excel does not have a dedicated Poisson function, but the PMF can be built using standard functions: | Cell | Content | Purpose | |------|---------|---------| | D3 | $\lambda$ (mean) | Input parameter | | E3 | `=D3` (variance) | Since $\text{Var}(Y)=\lambda$ | | F3 | `=SQRT(E3)` | Standard deviation | | B6:B106 | $y = 0, 1, 2, \dots, 100$ | Values of the random variable | | C6 | `=EXP(-D3) * D3^B6 / FACT(B6)` | PMF: $P(Y=y)$ | | D6 | `=C6` | CDF for $y=0$ (since $P(Y \le 0)=P(Y=0)$) | | D7 | `=C7 + D6` (drag down) | CDF: $P(Y \le y) = P(Y \le y-1) + P(Y=y)$ | | E6 | `=1` | Tail probability for $y=0$: $P(Y \ge 0)=1$ | | E7 | `=E6 - C6` | Tail: $P(Y \ge 1) = P(Y \ge 0) - P(Y=0)$ (drag down for $y\ge 2$) | This table allows quick computation and plotting of the PMF for any $\lambda$. --- ### Example 1: Customer Arrivals at an Eatery At Sheetal Dadava, the number of customers arriving in one hour follows a Poisson distribution with $\lambda = 10$. Questions and solutions: | Question | Probability Statement | $\lambda$ | Excel Lookup | Result | |----------|----------------------|-----------|--------------|--------| | Exactly 8 customers in 1 hour | $P(Y=8)$ | 10 | Column C, $y=8$ | 0.113 | | More than 10 customers in 1 hour | $P(Y > 10) = P(Y \ge 11)$ | 10 | Column E, $y=11$ | 0.417 | | Exactly 4 customers in 30 minutes | $P(Y=4)$ | 5* | Column C, $y=4$ | 0.175 | | At most 10 customers in 30 minutes | $P(Y \le 10)$ | 5* | Column D, $y=10$ | 0.986 | *$\lambda$ scales with time: for a 30‑minute interval, $\lambda = 10 \times \frac{30}{60} = 5$ (the process is **Poisson**; the rate is proportional to interval length). > **Exam tip:** When the time interval changes, always rescale $\lambda$. “More than 10” means $Y > 10$, which equals $Y \ge 11$. Reading the wrong row is a common trap. --- ### Example 2: Social Media Likes Sriram’s weekly likes follow a Poisson distribution with $\lambda = 14$. Similarly, daily likes use $\lambda = 14 / 7 = 2$. | Question | Probability Statement | $\lambda$ | Excel Lookup | Result | |----------|----------------------|-----------|--------------|--------| | At least 10 likes in a week | $P(Y \ge 10)$ | 14 | Column E, $y=10$ | 0.891 | | Between 10 and 20 likes in a week (inclusive) | $P(10 \le Y \le 20) = \sum_{y=10}^{20} P(Y=y)$ | 14 | Sum of column C for $y=10$ to $20$ | 0.843 | | At least 5 likes on a given day | $P(Y \ge 5)$ | 2 | Column E, $y=5$ | 0.053 | | No likes on a given day | $P(Y=0)$ | 2 | Column C, $y=0$ | 0.135 | > **Exam tip:** For “between … and …” always check inclusiveness. If both endpoints are included, sum the PMF values directly. The tail probability column gives $P(Y \ge y)$, not $P(Y > y)$. --- ### Key Takeaways – Poisson Examples - The **Poisson PMF** is $P(Y=y) = e^{-\lambda}\lambda^y / y!$; $\lambda$ = mean = variance. - **Excel setup** (no built‑in function) uses `EXP`, `^`, and `FACT` to compute PMF, then cumulative and tail probabilities by iteration. - When the **time interval changes**, $\lambda$ scales proportionally (e.g., half the time → half the $\lambda$). - Translating a business question into a probability statement is critical: “more than 10” = $Y > 10 = Y \ge 11$; “at most 10” = $Y \le 10$; “at least 10” = $Y \ge 10$. - For **range probabilities** (between a and b inclusive), sum the PMF for each $y$ in that range. ### Examples of Poisson Distribution (Call Center) The **Poisson distribution** models the number of **events** (e.g., phone calls) occurring in a fixed interval of time when events happen independently at a constant average rate. Its only parameter is the **mean** $\lambda$ (the average number of events per interval). The probability mass function is $$P(Y = y) = \frac{e^{-\lambda} \lambda^y}{y!}, \quad y = 0,1,2,\dots$$ A classic application is call‑center staffing. A call center receives calls according to a **Poisson process**: the number of calls in any interval depends only on the interval length, not on the time of day, and successive intervals are independent. (More advanced models use **non‑stationary Poisson processes** with time‑varying rates.) ### Scaling the Poisson Parameter $\lambda$ The average rate is given for one interval but may be needed for another. If the rate is constant, $\lambda$ scales linearly with the interval length. > **Example:** The call center u.net averages **6 calls per 15 minutes**. > Rate per minute = $6 / 15 = 0.4$ calls/min. > For any $t$‑minute interval, $\lambda = 0.4 \cdot t$. | Interval | $\lambda$ calculation | $\lambda$ | Query | Result (from PMF) | |---|---|---|---|---| | 5 minutes | $6/15 \times 5$ | 2 | $P(Y = 3)$ | $0.18$ | | 15 minutes | (given) | 6 | $P(Y = 10)$ | $0.041$ | | 3 minutes | $6/15 \times 3$ | 1.2 | $P(Y = 0)$ | $0.301$ | ### Worked Calculations #### 1. Probability of 3 calls in 5 minutes $\lambda = 2$, $y=3$: $$P(Y=3) = \frac{e^{-2} 2^3}{3!} = \frac{0.1353 \times 8}{6} \approx 0.1804$$ There is roughly an **18% chance** of exactly 3 calls in a 5‑minute window. #### 2. Probability of 10 calls in 15 minutes $\lambda = 6$, $y=10$: $$P(Y=10) = \frac{e^{-6} 6^{10}}{10!} \approx 0.0413$$ A **4.1% chance** – a relatively low probability, suggesting such high demand may strain staffing. #### 3. Probability of no calls during a 3‑minute break $\lambda = 1.2$, $y=0$: $$P(Y=0) = e^{-1.2} \approx 0.3012$$ Only a **30% chance** that a 3‑minute break will be uninterrupted. The agent is likely to be called back before the break ends. ### Key Takeaways - The **Poisson distribution** depends entirely on the mean $\lambda$ for the given interval. - **Scaling**: $\lambda$ for a new interval = (original rate per unit time) × (new interval length). - Probabilities are computed directly from the PMF (or a spreadsheet). - Call‑center applications illustrate how randomness affects service quality and staffing decisions. > **Exam tip:** Always check that the $\lambda$ you use matches the interval of the question. A common mistake is to use the original $\lambda$ without rescaling. ### Poisson Distribution – Worked Examples The **Poisson distribution** models the *count* of events occurring in a fixed interval of time or space when events happen independently at a constant average rate. The single parameter $\lambda$ (often called the **rate parameter**) equals both the mean and variance: $$P(Y = y) = \frac{e^{-\lambda} \lambda^y}{y!}, \quad y = 0,1,2,\dots \qquad \mathbb{E}[Y] = \lambda,\quad \operatorname{Var}(Y) = \lambda$$ When the interval changes, $\lambda$ scales proportionally. ### Example 1: Mall Visitor Arrivals > **Context:** Prozone Mall, Aurangabad. Average visits during busy hour = 180 per hour. Manager Mansoor wants the probability of 10–20 people accumulating in a **10‑minute** window. **Adjusting $\lambda$ for the new interval** - 180 per hour $\rightarrow$ 10 minutes: $\lambda = 180 \times \frac{10}{60} = 30$ visitors per 10 min - Similarly, if average is 150/hr → $\lambda = 25$; if 210/hr → $\lambda = 35$ **Probabilities (from Poisson PMF)** | Average per hour | $\lambda$ (10 min) | $P(10 \le Y \le 20)$ | |-----------------|--------------------|-----------------------| | 150 | 25 | 0.73 | | 180 | 30 | 0.526 | | 210 | 35 | 0.225 | **Why does the probability decrease as $\lambda$ increases?** The Poisson distribution becomes roughly symmetric around its mean. As $\lambda$ shifts right (25 → 30 → 35), the fixed window [10,20] captures less probability mass because the distribution moves to higher counts. ```mermaid flowchart LR A[Average arrivals per hour: 150 / 180 / 210] --> B[Adjust to 10 min: λ = 25 / 30 / 35] B --> C[Compute P(10 ≤ Y ≤ 20) from Poisson] C --> D{Result} D --> E[λ=25 → 0.73] D --> F[λ=30 → 0.526] D --> G[λ=35 → 0.225] E --> H[Interpret: counterintuitive but correct] ``` > **Exam tip:** Always re‑scale $\lambda$ to match the interval of interest. The probability over the *same* numeric range can rise or fall as $\lambda$ changes – your intuition about “more arrivals = more in the window” fails when the window is far from the mean. --- ### Example 2: Highway Defects > **Context:** Maharashtra State Highway No. 3. Average defects = 3 per km. Count of defects in a stretch follows Poisson. **Probabilities for 1 km stretch ($\lambda=3$)** - $P(Y \ge 3) = 0.577$ (tail probability) - $P(Y \le 5) = 0.916$ (cumulative) **Probabilities for an 8 km stretch ($\lambda = 3 \times 8 = 24$)** - $P(Y \le 40) = 0.999$ - $P(Y \ge 20) = 0.82$ **Common mistake:** Trying to compute $P(Y \le 40 \text{ in 8 km})$ as $[P(Y \le 5 \text{ in 1 km})]^8$ (or $0.916^5$ as initially attempted). This is wrong because it assumes *every* 1‑km segment must have ≤5 defects – the total can be ≤40 even if some segments exceed 5, as long as others compensate. > **Exam tip:** For a Poisson process, the total count over combined independent intervals is Poisson with $\lambda_{\text{total}} = \lambda_{\text{unit}} \times \text{number of units}$. NEVER multiply probabilities of sub‑intervals. --- ### Example 3: Social Media Flags > **Context:** NIA analyst Nitin monitors flags per conversation. Average = 5 flags per conversation. Flags occur independently and at constant rate. **Single conversation ($\lambda=5$)** - $P(2 \le Y \le 8) = 0.891$ - $P(Y \ge 10) = 0.032$ (less than 3% – low alert) **Two consecutive conversations ($\lambda = 5+5 = 10$)** - $P(4 \le Y \le 16) = 0.963$ - $P(Y < 4) = P(Y \le 3) = 0.01$ (very unlikely) Note that “less than 4 flags in two conversations” means $Y \le 3$, not $Y \le 4$. **Result summary table** | Scenario | $\lambda$ | Query | Probability | |----------|-----------|-------|-------------| | 1 conversation | 5 | $2 \le Y \le 8$ | 0.891 | | 1 conversation | 5 | $Y \ge 10$ | 0.032 | | 2 conversations | 10 | $4 \le Y \le 16$ | 0.963 | | 2 conversations | 10 | $Y \le 3$ | 0.01 | --- ### Key Properties of the Poisson Distribution - **Constant rate** – probability of an event is the same in any two intervals of equal length. - **Independence** – occurrence in one interval is independent of occurrence in any other non‑overlapping interval. - **Mean = Variance** = $\lambda$. These properties make Poisson suitable for counts over time (arrivals, calls, flags) and over space (defects per km, potholes, errors in wafers or text). --- ### Connection Between Binomial and Poisson When $p$ (success probability) is *small* and $n$ is large, the binomial distribution $\operatorname{Bin}(n,p)$ approximates a Poisson with $\lambda = np$. - Binomial: $\mathbb{E}[Y]=np$, $\operatorname{Var}(Y)=np(1-p)$ - Poisson: $\mathbb{E}[Y]=\operatorname{Var}(Y)=\lambda$ If $p$ is small, $1-p \approx 1$, so binomial variance ≈ $np = \lambda$, matching Poisson. Many Poisson distributions also appear symmetric and bell‑shaped for moderate $\lambda$ – a preview of the Central Limit Theorem. > **Exam tip:** Use the Poisson approximation to the binomial when $n$ is large, $p$ is small, and $np$ is moderate (rule of thumb: $n \ge 20$, $p \le 0.05$). --- **Key Takeaways** - Poisson models counts of rare, independent events over time/space; one parameter $\lambda$ = mean = variance. - When interval changes, $\lambda$ scales proportionally; always recompute for the exact interval. - Probabilities computed via PMF, cumulative (CDF), or tail – spreadsheet tools are helpful. - Common pitfalls: multiplying probabilities across intervals instead of summing means; confusing $P(Y < k)$ with $P(Y \le k)$. - The binomial approximates Poisson when $p$ is small ($\lambda = np$).

Sampling and Sampling Distributions

Sampling Process

Sampling is the process of selecting a subset of observations (a sample) from a larger population to make inferences about population parameters (e.g., mean, proportion, standard deviation). The goal is to gather data efficiently and use it to answer research questions about the entire population.

  • Element: an entity for which data is collected.
  • Population: the collection of all elements of interest.
  • Sample: a subset of the population.

Two main uses:

  1. Viren’s election poll: sample of 400 voters → 160 prefer a candidate → estimated population proportion p^=160400=0.40\hat{p} = \frac{160}{400} = 0.40 (40%).
  2. Manoj’s migrant worker study: sample of 120 workers → average yearly earnings ₹36,500 → estimated population mean xˉ=36500\bar{x} = 36500.

These are sample statistics used as estimates of the true population parameters. Because the sample is only a portion, error exists; proper sampling methods provide guarantees on reliability.

Steps in the Sampling Process

  1. Identify the target population – clearly define who (or what) is being studied.
    Example: Manoj’s “migrant temporary workers” needs boundaries (age, gender, type of work) to avoid vagueness.

  2. Decide the sampling frame – the source or procedure to list all elements of the target population.
    Example: Viren can use voter registration data; Manoj has no pre-built database of migrant workers, making this step harder.

  3. Determine the sample size – the minimum number of records required.

    • Larger samples improve precision but increase cost and time.
    • Sample size affects confidence level and margin of error.
  4. Choose the sampling method – the technique to select individual cases from the target population using the sampling frame.

    • Broad classification: probabilistic vs. non-probabilistic methods.

Exam tip: The sampling frame determines the accuracy of a study. If the frame is incomplete or biased, even a large sample can produce misleading inferences.

Key takeaways – Sampling Process

  • Sampling is a subset used to estimate population parameters (mean, proportion, etc.).
  • Sample statistics (e.g., xˉ\bar{x}, p^\hat{p}) are not exact; error is inevitable.
  • The four steps are: define target population → choose sampling frame → decide sample size → select sampling method.
  • A poor sampling frame or insufficient sample size undermines reliability.

Sampling Methods

Sampling methods fall into two categories: probabilistic (selection follows a probability distribution) and non-probabilistic (selection does not follow a probability distribution).

flowchart LR
   A[Sampling Methods] --> B[Probabilistic]
   A --> C[Non-Probabilistic]
   B --> B1[Simple Random]
   B --> B2[Stratified]
   B --> B3[Cluster]
   C --> C1[Systematic]
   C --> C2[Convenience]
   C --> C3[Judgment]
   C --> C4[Voluntary]

Probabilistic Sampling

Simple Random Sampling

  • Every subject in the population has an equal probability of being selected.
  • Best when the population is homogeneous.
  • Execution: label all elements sequentially, then generate uniform random numbers (e.g., in Excel using RAND() or RANDBETWEEN()).
  • Viren’s case: label all 4 crore voters, generate 400 random numbers, and select those entries.

Stratified Sampling

  • Population is divided into mutually exclusive and collectively exhaustive groups called strata (e.g., by age, gender, income).
  • Strata should be as homogeneous as possible; simple random sampling is applied within each stratum.
  • Sample size per stratum should be proportional to the stratum’s size in the population (e.g., if 40% of workers are women, then 40% of the sample should be women).
  • Final sample = combination of all stratum samples.
  • Useful when the population is heterogeneous; stratified sampling can achieve precision comparable to a larger simple random sample.
  • Manoj’s study: strata could be male/female or age groups (e.g., <20, 20–30, 30–40).

Cluster Sampling

  • Population is divided into separate clusters (each element belongs to exactly one cluster).
  • A simple random sample of clusters is taken; all elements within each selected cluster form the sample.
  • Clusters should be heterogeneous (each cluster a mini-representation of the population) – this is the key difference from strata (which are homogeneous).
  • Also called area sampling when clusters are geographic units (e.g., districts, municipalities).
  • Viren: could select a few municipalities and survey all voters there, assuming each municipality is a good replica of Rajasthan.
  • Typically requires a larger sample size than simple random or stratified, but can reduce cost and time because data collection is concentrated in a few clusters.

Exam tip: Strata → homogeneous groups; cluster → heterogeneous groups. The distinction is commonly tested.

Non-Probabilistic Sampling

Systematic Sampling

  • Useful when simple random sampling is time‑consuming (generating random numbers and searching the list).
  • Steps:
    1. Randomly select one element from the first kk elements of the population list (where k=population size/desired sample sizek = \text{population size} / \text{desired sample size}).
    2. Then select every kk‑th element thereafter.
  • Viren: population 4 crore, sample 400 → k=100,000k = 100{,}000; pick a random start among the first 100,000, then every 100,000th element.
  • Because the first selection is random, systematic sampling is often assumed to have properties similar to simple random sampling (though it is non‑probabilistic by strict definition).

Convenience Sampling

  • Elements are selected based on ease of access; no known probability of selection.
  • Example: Manoj surveys migrant workers he has recently interacted with at the plant.
  • Example: Traffic inspectors pulling over the next motorist at an intersection.
  • Advantages: easy and cheap.
  • Disadvantages: impossible to evaluate representativeness; no robust statistical inference possible.

Judgment Sampling

  • A knowledgeable person selects elements they believe are most representative of the population.
  • Example: TV panelists expressing opinions on a political issue; Viren asking a handful of people from a municipality.
  • Quality depends entirely on the selector’s expertise; results must be interpreted with caution.

Voluntary Sampling

  • Data comes from volunteers who choose to participate.
  • Example: Customer survey requests (mostly unhappy customers respond); clinical trial volunteers.
  • Strong self‑selection bias – results are unlikely to represent the general population.

Key takeaways – Sampling Methods

  • Probabilistic: each element has a known probability of selection → allows statistical inference.
    • Simple random: equal chance; best for homogeneous populations.
    • Stratified: homogeneous strata → proportional allocation.
    • Cluster: heterogeneous clusters → sample all elements in selected clusters.
  • Non‑probabilistic: selection is not based on probability → inference is limited.
    • Systematic: easier than simple random; first element random then fixed interval.
    • Convenience: easy but potentially very biased.
    • Judgment: depends on expert’s judgment.
    • Voluntary: severe self‑selection bias.
  • Always prefer probabilistic methods when possible; non‑probabilistic methods may be used for exploratory work or when a sampling frame is unavailable.

Analysis of Sample Data

The goal of collecting a sample is rarely to describe only that sample. Instead, we use sample data to estimate unknown population quantities — the parameters. The most common parameters are the population mean μ\mu, population standard deviation σ\sigma, and population proportion PP. The numbers computed from the sample are called sample statistics; when we use them to guess the parameter, they become point estimates.

Population Parameters vs. Sample Statistics

Population parameter (unknown)Sample statistic (computed from data)Point estimate (numerical value)
Mean μ\muSample mean xˉ=1nxi\bar{x} = \frac{1}{n}\sum x_ixˉ\bar{x}
Standard deviation σ\sigmaSample standard deviation s=1n1(xixˉ)2s = \sqrt{\frac{1}{n-1}\sum (x_i-\bar{x})^2}ss
Proportion PPSample proportion p^=count in samplesample size\hat{p} = \frac{\text{count in sample}}{\text{sample size}}p^\hat{p}

Note: p^\hat{p} is often written as pp with a caret; the transcript uses pˉ\bar{p} interchangeably.

Why Point Estimates Are Not Unique

A single survey yields one set of numbers. But if we repeated the sampling process on the same population, we would almost certainly obtain different values of xˉ\bar{x}, ss, and p^\hat{p}. Therefore:

  • xˉ\bar{x} is one of many possible estimates of μ\mu.
  • ss is one of many possible estimates of σ\sigma.
  • p^\hat{p} is one of many possible estimates of PP.

This variability is natural — the sample is only a subset. The difference between a point estimate and the true parameter is called sampling error, and understanding it is the foundation for constructing confidence intervals (covered later).

Worked Example: Chroma Store Satisfaction

Basavaraju collected data from 36 customers (sample size n=36n=36). The key variable is satisfaction score (0–100).

Descriptive statistics from the sample:

StatisticValue
Sample mean xˉ\bar{x}57.31
Sample median59
Sample mode61
Sample range40 – 66 (approx.)
Sample standard deviation ss6.38
Sample proportion scoring 60\ge 60p^=17/360.47\hat{p} = 17/36 \approx 0.47

Interpretation as point estimates:

  • xˉ=57.31\bar{x} = 57.31 → point estimate of the population mean μ\mu.
  • s=6.38s = 6.38 → point estimate of the population standard deviation σ\sigma.
  • p^=0.47\hat{p} = 0.47 → point estimate of the population proportion PP of customers who are "reasonably satisfied" (score 60\ge 60).

These are our best guesses from this one sample. Other samples would yield different numbers.

Exam tip: Distinguish clearly between the symbol for the statistic (xˉ\bar{x}, ss, p^\hat{p}) and the symbol for the parameter (μ\mu, σ\sigma, PP). The transcript uses pˉ\bar{p} for sample proportion; convention often uses p^\hat{p}. Both are acceptable point estimators.

Key Takeaways

  • Point estimation uses sample statistics to produce a single best guess of an unknown population parameter.
  • Common parameters: mean μ\mu, standard deviation σ\sigma, proportion PP.
  • Common sample statistics: xˉ\bar{x}, ss, p^\hat{p}.
  • Point estimates vary from sample to sample; they are not unique.
  • The computed values from Basavaraju’s data: xˉ=57.31\bar{x}=57.31, s=6.38s=6.38, p^0.47\hat{p}\approx0.47 — each is one possible estimate.

Sampling Distribution

A point estimator (like the sample mean xˉ\bar{x}, sample proportion pˉ\bar{p}, or sample standard deviation ss) varies from sample to sample. If we could take many samples from the same population, we would get many different estimates. The probability distribution of a point estimator over all possible samples is called its sampling distribution.

Point Estimators Are Random Variables

  • Selecting a simple random sample is a random experiment.
  • The sample mean xˉ\bar{x} is a numerical outcome of that experiment → xˉ\bar{x} is a random variable.
  • Therefore, xˉ\bar{x} has its own probability distribution (PDF or PMF) with an expected value, variance, and shape.
  • The same holds for pˉ\bar{p} and ss.

A sampling distribution is the distribution of all possible values of a sample statistic.

Properties of the Sampling Distribution of xˉ\bar{x}

1. Expected Value (Mean)

E[xˉ]=μE[\bar{x}] = \mu

  • μ\mu = population mean.
  • When E[estimator]=population parameterE[\text{estimator}] = \text{population parameter}, the estimator is unbiased.
  • Hence xˉ\bar{x} is an unbiased estimator of μ\mu.

2. Standard Deviation (Standard Error)

For an infinite population (or when population size NN is large relative to sample size nn):

σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}

  • σ\sigma = population standard deviation.
  • σxˉ\sigma_{\bar{x}} is called the standard error of xˉ\bar{x} — to distinguish it from the population standard deviation.
  • Larger nn → smaller standard errorxˉ\bar{x} tends to be closer to μ\mu.

3. Shape (Form)

  • If the population itself is normally distributed with mean μ\mu and standard deviation σ\sigma, then xˉ\bar{x} is normally distributed with mean μ\mu and standard error σ/n\sigma/\sqrt{n}.
  • (For non‑normal populations, the shape is determined by the Central Limit Theorem, discussed later.)

Worked Example: Basavaraju’s Survey

  • n=36n = 36 customers.
  • Assume (from a previous survey) that the population standard deviation σ=6\sigma = 6.
  • Then the standard error of xˉ\bar{x} is:

σxˉ=636=1\sigma_{\bar{x}} = \frac{6}{\sqrt{36}} = 1

  • Basavaraju’s observed xˉ=57.31\bar{x} = 57.31 is a single draw from a distribution:
    • Centered at μ\mu (unknown)
    • With spread = 1

Exam tip: The standard error σ/n\sigma / \sqrt{n} measures the precision of xˉ\bar{x} as an estimate of μ\mu. It decreases as nn increases — one reason large samples are preferred.

How Repeated Sampling Builds the Concept

flowchart LR
  A[Population<br/>μ, σ] --> B[Sample 1 → x̄₁]
  A --> C[Sample 2 → x̄₂]
  A --> D[Sample 3 → x̄₃]
  A --> E[... many samples]
  B --> F[Histogram of x̄ values<br/>≈ Sampling Distribution]
  C --> F
  D --> F
  E --> F
  F --> G["E[x̄] = μ<br/>σₓ̄ = σ/√n<br/>(Normal if population normal)"]

In practice we take only one sample, but we know its xˉ\bar{x} comes from a distribution with known expected value and standard error.

Key takeaways

  • xˉ\bar{x} is a random variable; its probability distribution is the sampling distribution of xˉ\bar{x}.
  • E[xˉ]=μE[\bar{x}] = \muxˉ\bar{x} is an unbiased estimator of the population mean.
  • The standard error of xˉ\bar{x} is σxˉ=σ/n\sigma_{\bar{x}} = \sigma / \sqrt{n} (population infinite or large).
  • Larger sample size → smaller standard error → more precise estimate.
  • If the population is normal, xˉ\bar{x} is exactly normal; otherwise its shape depends on the Central Limit Theorem (later).

Examples of Central Limit Theorem

The Central Limit Theorem (CLT) states that for a random sample of size nn drawn from any population with mean μ\mu and finite standard deviation σ\sigma, the sampling distribution of the sample mean Xˉ\bar{X} is approximately normal when nn is large (typically n30n \ge 30):

XˉN ⁣(μ,  σXˉ2),σXˉ=σn\bar{X} \sim N\!\left(\mu,\; \sigma_{\bar{X}}^2\right),\qquad \sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}}

σXˉ\sigma_{\bar{X}} is called the standard error of the mean. The following examples demonstrate how to use the CLT to compute probabilities about Xˉ\bar{X}.


Example 1: Unemployment duration (Kailash Sharma)

  • Population: all unemployed individuals in Rajasthan
  • Known parameters: μ=17.5\mu = 17.5 weeks, σ=4\sigma = 4 weeks
  • Sample size: n=50n = 50
  • Question: probability that the sample mean Xˉ\bar{X} is within 11 week (and 0.50.5 week) of μ\mu

Step 1 – Standard error

σXˉ=450=0.57 weeks\sigma_{\bar{X}} = \frac{4}{\sqrt{50}} = 0.57 \text{ weeks}

Step 2 – Within 1 week

P(Xˉμ<1)=P ⁣(XˉμσXˉ<10.57)=P(Z<1.77)P(|\bar{X} - \mu| < 1) = P\!\left( \left|\frac{\bar{X} - \mu}{\sigma_{\bar{X}}}\right| < \frac{1}{0.57} \right) = P(|Z| < 1.77)

From standard normal table: P(Z<1.77)=0.923P(|Z| < 1.77) = 0.923 (92.3% chance).

Step 3 – Within 0.5 week

P(Xˉμ<0.5)=P ⁣(Z<0.50.57)=P(Z<0.88)=0.62P(|\bar{X} - \mu| < 0.5) = P\!\left(|Z| < \frac{0.5}{0.57}\right) = P(|Z| < 0.88) = 0.62 (62% chance).

Exam tip: Dividing the margin of error by the standard error yields the zz-score bound. Always convert the Xˉ\bar{X}-probability problem into a standard normal probability.


Why sample when population parameters are known?

Kailash already knows μ\mu and σ\sigma, but sampling is still valuable: a detailed study on a representative subset allows deeper qualitative analysis (e.g., understanding challenges unemployed individuals face). Ensuring that the sample mean lies close to μ\mu (e.g., within 1 week) confirms that the sample is representative of the population, so conclusions from the detailed study can be generalized.


Example 2: Rainfall in two districts (Shantibai)

DistrictPopulation mean μ\mu (cm)Population σ\sigma (cm)Sample size nnStandard error σXˉ=σ/n\sigma_{\bar{X}} = \sigma/\sqrt{n}
Jaisalmer294304/300.734/\sqrt{30} \approx 0.73
Jhalawar664444/440.604/\sqrt{44} \approx 0.60

Goal: probability that Xˉ\bar{X} is within 1 cm of the respective μ\mu.

  • Jaisalmer: z=1/0.73=1.37z = 1 / 0.73 = 1.37, P(Z<1.37)=0.83P(|Z| < 1.37) = 0.83 (83%)
  • Jhalawar: z=1/0.60=1.67z = 1 / 0.60 = 1.67, P(Z<1.67)=0.91P(|Z| < 1.67) = 0.91 (91%)

The larger sample size for Jhalawar gives a smaller standard error and a higher probability that the sample mean will be close to μ\mu.


Example 3: Tax preparation fees (Motilal Oswal)

  • Population: all certified tax consultants in Rajasthan; μ=1800\mu = 1800 rupees, σ=50\sigma = 50 rupees
  • Part A: n=40n = 40 clients
  • Part B: n=75n = 75 clients
  • Question: P(Xˉμ<10)P(|\bar{X} - \mu| < 10)

Part A (n=40)

σXˉ=50407.91,z=107.911.26,P(Z<1.26)=0.792\sigma_{\bar{X}} = \frac{50}{\sqrt{40}} \approx 7.91,\quad z = \frac{10}{7.91} \approx 1.26,\quad P(|Z| < 1.26) = 0.792

Part B (n=75)

σXˉ=50755.77,z=105.771.73,P(Z<1.73)=0.916\sigma_{\bar{X}} = \frac{50}{\sqrt{75}} \approx 5.77,\quad z = \frac{10}{5.77} \approx 1.73,\quad P(|Z| < 1.73) = 0.916

Increasing nn reduces the standard error, making the sample mean more precise — the probability of being within 10 rupees jumps from 79.2% to 91.6%.

Remember: The CLT applies only to the sampling distribution of Xˉ\bar{X}, not to the population distribution. The population of fees may not be normal; the normal approximation is for Xˉ\bar{X} because n30n \ge 30.


Example 4: Alzheimer’s disease duration (Dr. Sasdev)

  • Population: Alzheimer patients; duration ranges 3–20 years, but distribution is skewed (mean = 8 years, median ≠ midpoint)
  • Known: μ=8\mu = 8 years, σ=4\sigma = 4 years
  • Sample size: n=30n = 30
  • Standard error: σXˉ=4/300.73\sigma_{\bar{X}} = 4/\sqrt{30} \approx 0.73 years

Probabilities

  1. Less than 7 years:
    z=780.731.37,P(Xˉ<7)=0.08z = \frac{7-8}{0.73} \approx -1.37,\quad P(\bar{X} < 7) = 0.08

  2. Exceeds 7 years:
    P(Xˉ>7)=10.08=0.92P(\bar{X} > 7) = 1 - 0.08 = 0.92

  3. Within 1 year of μ\mu (i.e., 7 to 9 years):
    P(7<Xˉ<9)=P(1.37<Z<1.37)=0.83P(7 < \bar{X} < 9) = P(-1.37 < Z < 1.37) = 0.83

Even though the population distribution is right-skewed (mean not at the midpoint of range), the CLT ensures the sampling distribution of Xˉ\bar{X} is approximately normal because n=30n=30.


Key takeaways

  • The CLT allows us to treat Xˉ\bar{X} as normal when n30n \ge 30, regardless of the population shape.
  • The standard error σ/n\sigma/\sqrt{n} measures the spread of Xˉ\bar{X}; larger nn yields a smaller standard error and higher confidence that Xˉ\bar{X} is near μ\mu.
  • To find probabilities: transform Xˉ\bar{X} to Z=(Xˉμ)/(σ/n)Z = (\bar{X} - \mu) / (\sigma/\sqrt{n}) and use the standard normal table.
  • Sampling can be employed even when population parameters are known — to verify representativeness for a deeper study.
  • Increasing sample size narrows the sampling distribution, increasing the probability of falling within a fixed margin of error.

The Central Limit Theorem (CLT)

The Problem: The population distribution of XX may not be normal (skewed, uniform, arbitrary). Yet we need to know the sampling distribution of the sample mean Xˉ\bar{X} to make probability statements about how close Xˉ\bar{X} is to μ\mu.

The Core Insight (Intuition): Even when the population is wildly non‑normal, the distribution of sample averages becomes approximately normal once the sample size is large enough. The population itself never changes shape — it is the averaging process that smooths things out.

Formal Statement (for Xˉ\bar{X}):
When random samples of size nn are drawn from any population with mean μ\mu and standard deviation σ\sigma, the sampling distribution of Xˉ\bar{X} can be approximated by a normal distribution if nn is sufficiently large.

The approximation has:

  • Mean: μXˉ=μ\mu_{\bar{X}} = \mu
  • Standard error: σXˉ=σn\sigma_{\bar{X}} = \dfrac{\sigma}{\sqrt{n}}

Thus, for large nn:
Xˉ    N ⁣(μ,  σn)\bar{X} \;\approx\; N\!\left(\mu,\; \frac{\sigma}{\sqrt{n}}\right)

Visual intuition

The figure below (described in the lecture) shows four populations (normal, uniform, skewed, arbitrary) and the sampling distribution of Xˉ\bar{X} for increasing nn:

Populationn=2n=2n=30n=30+
NormalAlready normalNormal
UniformTriangular‑likeNearly normal
SkewedStill skewedNearly normal
ArbitraryIrregularNearly normal

Key: At n=2n=2 the sampling distribution is not normal and not the population shape. At n30n\geq 30 it becomes close to normal for most populations.

The magic number n=30n=30

  • The theorem mathematically says: as nn \to \infty, the sampling distribution converges to normal.
  • Empirically, for most applications, n30n \ge 30 is “large enough” to use the normal approximation.
  • Exception: Highly skewed populations may need n>150n>150 before the approximation is good. But n=30n=30 works for typical cases.

Exam trap: The CLT is about the distribution of Xˉ\bar{X}, never about the population distribution. Saying “the population becomes normal with large samples” is a common mistake.

What CLT does not say

  • It does not change the population distribution.
  • It does not guarantee Xˉ=μ\bar{X} = \mu — only that the probability of Xˉ\bar{X} being close to μ\mu increases with nn.

Effect of Sample Size on Precision

The standard error of the mean is:
σXˉ=σn\sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}}

  • Doubling nn reduces σXˉ\sigma_{\bar{X}} by a factor of 2\sqrt{2}, not by half.
  • Larger nn → smaller spread → Xˉ\bar{X} is more likely to be near μ\mu.

Intuition: More data yields a more precise estimate of the population mean. The center (μ\mu) stays the same, but the tails shrink.


Worked Example: Basavaraju’s Survey

Basavaraju wants the probability that his sample mean xˉ=57.31\bar{x} = 57.31 (from n=36n=36) is within ±2\pm 2 of the unknown μ\mu.
Given: last year’s σ=6\sigma = 6.

Step 1: Verify CLT applies

n=3630n=36 \ge 30 → sampling distribution of Xˉ\bar{X} is approximately normal.

Step 2: Compute standard error

σXˉ=636=66=1\sigma_{\bar{X}} = \frac{6}{\sqrt{36}} = \frac{6}{6} = 1

Step 3: Probability statement

We want P(Xˉμ2)P(|\bar{X} - \mu| \le 2). Standardize:

Z=XˉμσXˉZ = \frac{\bar{X} - \mu}{\sigma_{\bar{X}}}

P(2Z2)=0.9544 (approx 0.95)P(-2 \le Z \le 2) = 0.9544 \ (\text{approx } 0.95)

Result: There is about a 95% chance that the sample mean is within ±2\pm 2 of the population mean. Only 5% chance it falls outside.

What if n=100n=100?

σXˉ=6100=0.6\sigma_{\bar{X}} = \frac{6}{\sqrt{100}} = 0.6

Now P(2Xˉμ2)P(-2 \le \bar{X}-\mu \le 2) becomes:

P ⁣(20.6Z20.6)=P(3.33Z3.33)>0.999P\!\left(\frac{-2}{0.6} \le Z \le \frac{2}{0.6}\right) = P(-3.33 \le Z \le 3.33) > 0.999

Result: With n=100n=100, the probability is over 99.9% that Xˉ\bar{X} is within ±2\pm 2 of μ\mu.

Table: Effect of nn on precision (fixed σ=6\sigma=6, range ±2\pm 2)

Sample size nnσXˉ\sigma_{\bar{X}}zz-limitsProbability
361.0±2\pm 20.95
1000.6±3.33\pm 3.330.999

The larger the sample, the higher the chance that Xˉ\bar{X} is close to μ\mu.


Sampling Distribution of the Sample Proportion pˉ\bar{p}

When working with proportions (categorical data), the same CLT logic applies to the sample proportion pˉ\bar{p}.

Intuition: pˉ\bar{p} is just the average of 0/1 indicator variables, so the CLT says its sampling distribution is approximately normal for large nn.

Formal result:
If nn is large (typically np5np \ge 5 and n(1p)5n(1-p) \ge 5), then:

pˉ    N ⁣(p,  σpˉ)\bar{p} \;\approx\; N\!\left(p,\; \sigma_{\bar{p}}\right)

where:

  • Mean: μpˉ=p\mu_{\bar{p}} = p (population proportion)
  • Standard error: σpˉ=p(1p)n\sigma_{\bar{p}} = \sqrt{\dfrac{p(1-p)}{n}}

Example 1: Manohar’s snack survey

  • Population proportion p=0.17p = 0.17 (spend > ₹2500)
  • n=80n=80σpˉ=0.17×0.8380=0.042\sigma_{\bar{p}} = \sqrt{\frac{0.17 \times 0.83}{80}} = 0.042
  • Want P(0.12pˉ0.22)P(0.12 \le \bar{p} \le 0.22) = P(1.19Z1.19)0.766P(-1.19 \le Z \le 1.19) \approx 0.766
    (Transcript gives 0.789; minor rounding difference.)

If n=160n=160:

  • σpˉ=0.17×0.83160=0.028\sigma_{\bar{p}} = \sqrt{\frac{0.17\times0.83}{160}} = 0.028
  • P(0.12pˉ0.22)=P(1.78Z1.78)0.925P(0.12 \le \bar{p} \le 0.22) = P(-1.78 \le Z \le 1.78) \approx 0.925
    (Transcript: 0.926.)

Example 2: Sunita’s book adoption rate

  • Population p=0.25p=0.25, sample standard error given as 0.06250.0625.
  • Find nn:

0.0625=0.25×0.75n    n=0.1875(0.0625)2=480.0625 = \sqrt{\frac{0.25\times0.75}{n}} \;\Rightarrow\; n = \frac{0.1875}{(0.0625)^2} = 48

  • Want P(pˉ0.3)P(\bar{p} \ge 0.3):

Z=0.30.250.0625=0.8    P(Z0.8)=0.2119Z = \frac{0.3-0.25}{0.0625} = 0.8 \;\Rightarrow\; P(Z \ge 0.8) = 0.2119

Result: 21% chance of reaching ≥30% adoption rate.

Example 3: Maliwal’s ghevar preference

  • p=0.75p = 0.75, n=200n=200σpˉ=0.75×0.25200=0.03\sigma_{\bar{p}} = \sqrt{\frac{0.75\times0.25}{200}} = 0.03
  1. P(pˉ>0.8)P(\bar{p} > 0.8):

Z=0.80.750.03=1.67    P(Z>1.67)=0.0475Z = \frac{0.8-0.75}{0.03} = 1.67 \;\Rightarrow\; P(Z>1.67) = 0.0475

  1. P(pˉ<0.6)P(\bar{p} < 0.6):

Z=0.60.750.03=5    P(Z<5)0Z = \frac{0.6-0.75}{0.03} = -5 \;\Rightarrow\; P(Z<-5) \approx 0

  1. 95% interval for pˉ\bar{p}:

Using inverse normal: z0.025=1.96z_{0.025} = -1.96, so:

0.75±1.96×0.03=[0.6912,  0.8088][0.69,0.81]0.75 \pm 1.96 \times 0.03 = [0.6912,\; 0.8088] \approx [0.69, 0.81]

Exam tip: For proportions, always check np5np \ge 5 and n(1p)5n(1-p) \ge 5 to justify using the normal approximation.


Key Takeaways

  • CLT: For large nn (30\ge 30 in practice), the sampling distribution of Xˉ\bar{X} is approximately normal, regardless of the population shape.
  • Standard error: σXˉ=σ/n\sigma_{\bar{X}} = \sigma / \sqrt{n}; increasing nn reduces spread and improves precision.
  • Proportions: pˉ\bar{p} also follows CLT; σpˉ=p(1p)/n\sigma_{\bar{p}} = \sqrt{p(1-p)/n}.
  • Population vs. sampling distribution: CLT does not change the population; it describes the averages.
  • Probability interpretation: With large nn, we can compute exact probabilities of Xˉ\bar{X} (or pˉ\bar{p}) being within a given distance of the population parameter.

Sampling Distribution of Proportion

The sample proportion pˉ\bar{p} is a point estimator of the population proportion pp. It is computed as:

pˉ=xn\bar{p} = \frac{x}{n}

where xx = number of elements in the sample that possess the characteristic of interest, and nn = sample size.

Example: In Basavaraj’s customer survey, x=17x = 17 customers gave a satisfaction score ≥ 60 out of n=36n = 36 respondents → pˉ=17/36=0.47\bar{p} = 17/36 = 0.47.

Because pˉ\bar{p} is a random variable, its probability distribution is called the sampling distribution of pˉ\bar{p}.

Expected Value and Unbiasedness

The expected value (mean) of the sampling distribution of pˉ\bar{p} is the population proportion:

E(pˉ)=pE(\bar{p}) = p

Thus pp is the center of the distribution. Since E(pˉ)=pE(\bar{p}) = p, pˉ\bar{p} is an unbiased estimator of pp (analogous to xˉ\bar{x} for μ\mu).

Example: If Basavaraj believes p=0.5p = 0.5, then pˉ=0.47\bar{p} = 0.47 comes from a distribution centered at 0.50.5.

Standard Error of the Proportion

The standard deviation of pˉ\bar{p} is called the standard error of the proportion, denoted σpˉ\sigma_{\bar{p}}:

σpˉ=p(1p)n\sigma_{\bar{p}} = \sqrt{\frac{p(1-p)}{n}}

This is derived from the binomial distribution of xx (see below). For a finite population, use the finite population correction if NN is not large relative to nn; here we assume a large population.

Example: For p=0.5p = 0.5, n=36n = 36:

σpˉ=0.5×0.536=0.2536=0.0833\sigma_{\bar{p}} = \sqrt{\frac{0.5 \times 0.5}{36}} = \sqrt{\frac{0.25}{36}} = 0.0833

Shape: Normal Approximation

The number of successes xx in a simple random sample from a large population is a binomial random variable: xBin(n,p)x \sim \text{Bin}(n, p). Its mean is npnp and variance np(1p)np(1-p).

When the sample size is large — specifically, when both np5np \ge 5 and n(1p)5n(1-p) \ge 5 — the binomial can be approximated by a normal distribution:

xN(np,  np(1p))x \approx N\bigl(np,\; np(1-p)\bigr)

Dividing by the constant nn leaves pp normal:

pˉ=xnN ⁣(p,  p(1p)n)\bar{p} = \frac{x}{n} \approx N\!\left(p,\; \frac{p(1-p)}{n}\right)

Hence, for large nn, the sampling distribution of pˉ\bar{p} is approximately normal with mean pp and standard error σpˉ=p(1p)/n\sigma_{\bar{p}} = \sqrt{p(1-p)/n}.

Exam tip: Always verify np5np \ge 5 and n(1p)5n(1-p) \ge 5 before using the normal approximation for pˉ\bar{p}. Otherwise the distribution may be skewed.

Applying the Sampling Distribution: Probability Calculations

The normal approximation allows us to compute probabilities about how close pˉ\bar{p} is to pp.

Basavaraj’s Customer Survey

Scenario: Assume p=0.5p = 0.5 (50% of customers score ≥ 60).
Question: What is the probability that pˉ\bar{p} from a sample of n=36n = 36 lies within ±0.05\pm 0.05 of pp (i.e., between 0.45 and 0.55)?

  • σpˉ=0.0833\sigma_{\bar{p}} = 0.0833
  • pˉN(0.5,0.0833)\bar{p} \sim N(0.5, 0.0833)
  • P(0.45pˉ0.55)=0.452P(0.45 \le \bar{p} \le 0.55) = 0.452

If nn increases to 100:

  • σpˉ=0.25/100=0.05\sigma_{\bar{p}} = \sqrt{0.25/100} = 0.05
  • P(0.45pˉ0.55)=0.683P(0.45 \le \bar{p} \le 0.55) = 0.683

Increasing sample size narrows the standard error → higher probability of being close to pp.

Bikaner Doctors (Dr. Pradak Chandak)

Scenario: National report claims p=0.42p = 0.42 of primary care doctors feel patients receive unnecessary care. A random sample of n=150n = 150 doctors is surveyed in the district.

Compute:

  1. σpˉ=0.42×0.58150=0.04\sigma_{\bar{p}} = \sqrt{\frac{0.42 \times 0.58}{150}} = 0.04
  2. pˉN(0.42,0.04)\bar{p} \sim N(0.42, 0.04)

Probability that pˉ\bar{p} is within ±0.03\pm 0.03 of pp (i.e., between 0.39 and 0.45):
P(0.39pˉ0.45)=0.547P(0.39 \le \bar{p} \le 0.45) = 0.547

Probability that pˉ>0.5\bar{p} > 0.5:
P(pˉ>0.5)=0.023(tail area)P(\bar{p} > 0.5) = 0.023 \quad (\text{tail area})

Summary: Properties of the Sampling Distribution of pˉ\bar{p}

PropertyExpression
Mean (expected value)E(pˉ)=pE(\bar{p}) = p
Standard errorσpˉ=p(1p)n\sigma_{\bar{p}} = \sqrt{\dfrac{p(1-p)}{n}}
Shape (large nn)Approximately normal if np5np \ge 5 and n(1p)5n(1-p) \ge 5
SourcexBinomial(n,p)x \sim \text{Binomial}(n,p) → divide by nn

Key takeaways

  • pˉ=x/n\bar{p} = x/n is the point estimator of pp; it is unbiased because E(pˉ)=pE(\bar{p}) = p.
  • The standard error σpˉ=p(1p)/n\sigma_{\bar{p}} = \sqrt{p(1-p)/n} measures the spread of pˉ\bar{p}.
  • For large samples (np5np \ge 5, n(1p)5n(1-p) \ge 5), pˉ\bar{p} is approximately normal.
  • Probability calculations about the difference between pˉ\bar{p} and pp use the normal distribution.
  • Larger sample sizes → smaller standard error → higher probability that pˉ\bar{p} is close to pp.

Sample Variance and Degrees of Freedom

The sample variance s2s^2 measures spread in a sample. For a random sample x1,x2,,xnx_1, x_2, \dots, x_n from a population with sample mean xˉ\bar{x}:

s2=1n1i=1n(xixˉ)2s^2 = \frac{1}{n-1} \sum_{i=1}^{n} (x_i - \bar{x})^2

The denominator is n1n-1, not nn, because one degree of freedom (DOF) is lost when estimating the mean. If the sample mean is fixed, only n1n-1 of the observations can vary freely; the last is determined.

Intuition: Given three numbers with mean 10 and two numbers are 1 and 2, the third must be 3012=2730-1-2=27. Only two numbers were free → n1=2n-1=2 DOF.

The Chi‑Square Connection for Sample Variance

The sample variance s2s^2 is a random variable. Unlike the sample mean xˉ\bar{x}, there is no Central Limit Theorem for s2s^2 — its distribution is unknown without assuming the population is normal.

Key result: If the population is normally distributed with variance σ2\sigma^2, then:

(n1)s2σ2χ(n1)2\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{(n-1)}

i.e., it follows a chi‑square distribution with n1n-1 degrees of freedom. The chi‑square distribution is:

  • Non‑negative and right‑skewed (for small df)
  • Becomes more symmetric and bell‑shaped as df increases

This does not directly give the distribution of s2s^2 alone, but it allows us to make probability statements about σ2\sigma^2 and σ\sigma using the sample value s2s^2.

flowchart LR
  A[Population normal] --> B[Sample of size n]
  B --> C[Compute s²]
  C --> D[(n-1)s²/σ² ~ χ²(n-1)]
  D --> E[Infer about σ² and σ]

Inference on Population Variance and Standard Deviation

Given one observed s2s^2 from a normal population, the chi‑square relation lets us bound σ2\sigma^2 with a given probability. For example, if ()(\sqrt{ } ) for a chi‑square with n1n-1 df the lower percentile is χα2\chi^2_{\alpha} and the upper percentile is χ1α2\chi^2_{1-\alpha}, then:

P((n1)s2χ1α/22<σ2<(n1)s2χα/22)=1αP\left( \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}} < \sigma^2 < \frac{(n-1)s^2}{\chi^2_{\alpha/2}} \right) = 1-\alpha


Basaraju Example (n=36, s² = 40.73, s = 6.38)

Assume normality. Then 35s2σ2χ(35)2\frac{35 \cdot s^2}{\sigma^2} \sim \chi^2_{(35)}.

  • 90% of the time χ352<46.06\chi^2_{35} < 46.06σ2>3540.7346.0630.92\sigma^2 > \frac{35 \cdot 40.73}{46.06} \approx 30.92σ>30.925.56\sigma > \sqrt{30.92} \approx 5.56.
  • 90% of the time χ352>24.8\chi^2_{35} > 24.8σ2<3540.7324.857.44\sigma^2 < \frac{35 \cdot 40.73}{24.8} \approx 57.44σ<57.447.58\sigma < \sqrt{57.44} \approx 7.58.

Thus, based on this single sample, the population standard deviation is between approximately 5.56 and 7.58 with roughly 90% confidence (using the two one‑sided 90% statements together).


Worked Examples

Kailash Sharma (unemployment data)

  • Population: μ=17.5\mu = 17.5 weeks, σ=4\sigma = 4 weeks.
  • Sample size n=50n = 50. Assume normality.
  • Random variable: 49s216χ(49)2\frac{49 \cdot s^2}{16} \sim \chi^2_{(49)}.

1. Probability s2>20s^2 > 20

P(s2>20)=P(χ492>492016=61.25)=0.113P(s^2 > 20) = P\left( \chi^2_{49} > \frac{49 \cdot 20}{16} = 61.25 \right) = 0.113 (from chi‑square template).

2. Probability s<3s < 3

s<3    s2<9s < 3 \iff s^2 < 9.

P(s<3)=P(χ492<49916=27.5625)=0.006P(s < 3) = P\left( \chi^2_{49} < \frac{49 \cdot 9}{16} = 27.5625 \right) = 0.006.


Motilal Oswal (tax preparation fees)

  • Population: μ=1800\mu = 1800 rupees, σ=50\sigma = 50 rupees.
  • Sample size n=40n = 40. Assume normality.
  • Distribution: 39s22500χ(39)2\frac{39 \cdot s^2}{2500} \sim \chi^2_{(39)}.

1. Probability s>60s > 60

s>60    s2>3600s > 60 \iff s^2 > 3600.

P(s>60)=P(χ392>3936002500=56.16)=0.037P(s > 60) = P\left( \chi^2_{39} > \frac{39 \cdot 3600}{2500} = 56.16 \right) = 0.037.

2. Claim: 90% chance s<55s < 55

s<55    s2<3025s < 55 \iff s^2 < 3025.

P(s<55)=P(χ392<3930252500=47.19)=0.827P(s < 55) = P\left( \chi^2_{39} < \frac{39 \cdot 3025}{2500} = 47.19 \right) = 0.827.

The claim is false — the actual probability is about 82.7%, not 90%.


Dr. Naveen Sachdev (Alzheimer's survival time)

  • Population: μ=8\mu = 8 years, σ=4\sigma = 4 years. Population is skewed (range 3–20 years, not normal).
  • Sample size n=30n = 30. Normality assumption is violated — use with caution.
  • Distribution under normality: 29s216χ(29)2\frac{29 \cdot s^2}{16} \sim \chi^2_{(29)}.

1. Probability s<3s < 3

s<3    s2<9s < 3 \iff s^2 < 9.

P(s<3)=P(χ292<29916=16.3125)=0.028P(s < 3) = P\left( \chi^2_{29} < \frac{29 \cdot 9}{16} = 16.3125 \right) = 0.028.

2. Probability 3.5<s<4.53.5 < s < 4.5

s[3.5,4.5]    s2[12.25,20.25]s \in [3.5, 4.5] \iff s^2 \in [12.25, 20.25].

P(3.5<s<4.5)=P(22.20<χ292<36.70)=0.658P(3.5 < s < 4.5) = P\left( 22.20 < \chi^2_{29} < 36.70 \right) = 0.658.

Exam tip: The chi‑square result for sample variance requires the population to be normally distributed. For skewed populations (like Dr. Sachdev’s), the calculated probabilities are approximate at best. A larger sample may help, but no CLT equivalent exists for variance.


Caution: Normality Assumption

All of the above inferences rely on the assumption that the population is normally distributed. If the population is not normal (e.g., skewed, like the Alzheimer's data), the distribution of (n1)s2σ2\frac{(n-1)s^2}{\sigma^2} is not exactly chi‑square. In practice:

  • For moderate to large samples, the chi‑square approximation may still be reasonable if the population is not too non‑normal.
  • Dr. Sachdev’s example illustrates a case where the assumption is clearly violated, so the computed probabilities (2.8%, 65.8%) should be interpreted as approximate, not exact.

Key takeaways

  • Sample variance uses denominator n1n-1 to account for the loss of one degree of freedom.
  • If the population is normal, (n1)s2σ2χ(n1)2\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{(n-1)}.
  • This relation allows probability statements about the population variance and standard deviation without having the direct distribution of s2s^2.
  • Use chi‑square tables or templates to find probabilities and thresholds.
  • The normality assumption is critical; without it, results are unreliable, especially for small samples.

Properties of Point Estimators

A point estimator is a sample statistic (e.g., xˉ\bar{x}, pˉ\bar{p}, ss) used to estimate a population parameter (e.g., μ\mu, pp, σ\sigma). Not all sample statistics make good estimators; four desirable properties distinguish excellent estimators.

Let θ\theta denote the population parameter of interest and θˉ\bar{\theta} the point estimator (sample statistic) for θ\theta.

Unbiasedness

An estimator θˉ\bar{\theta} is unbiased if its expected value equals the population parameter:

E(θˉ)=θE(\bar{\theta}) = \theta

  • For unbiased estimators, the mean of the sampling distribution is centred exactly on θ\theta; over many samples the over- and under-estimates balance out.
  • Bias = E(θˉ)θE(\bar{\theta}) - \theta. A biased estimator systematically over- or under-estimates θ\theta.
Unbiased estimatorPopulation parameterReason
xˉ\bar{x}μ\muE(xˉ)=μE(\bar{x}) = \mu
pˉ\bar{p}ppE(pˉ)=pE(\bar{p}) = p
s2s^2σ2\sigma^2E(s2)=σ2E(s^2) = \sigma^2 (uses n1n-1 in denominator to correct bias)

Exam tip: The sample variance s2s^2 uses n1n-1 exactly to make it an unbiased estimator of σ2\sigma^2. The sample standard deviation ss is not unbiased, but bias is small for moderate nn.

Efficiency

When two unbiased estimators exist for the same θ\theta, the one with smaller standard error is more efficient. A smaller standard error means values cluster more tightly around θ\theta.

  • Example: For a normal population, SE(xˉ)<SE(sample median)\text{SE}(\bar{x}) < \text{SE}(\text{sample median}), so sample mean is more efficient than sample median as an estimator of μ\mu.

Consistency

A consistent estimator improves as sample size grows: larger nn → estimates cluster closer to θ\theta.

  • Formally: limnP(θˉθ<ϵ)=1\lim_{n\to\infty} P(|\bar{\theta} - \theta| < \epsilon) = 1 for any ϵ>0\epsilon > 0.
  • This follows from standard error shrinking with nn:
    • SE(xˉ)=σ/n\text{SE}(\bar{x}) = \sigma / \sqrt{n}nn\uparrow → SE \downarrow
    • SE(pˉ)=p(1p)/n\text{SE}(\bar{p}) = \sqrt{p(1-p)/n}nn\uparrow → SE \downarrow

Sufficiency

A sufficient estimator uses all available data points in the sample.

  • Both xˉ\bar{x} and pˉ\bar{p} are sufficient: they sum or count every observation.
  • Sample median is not sufficient because it ignores the magnitude of values away from the centre.

Key takeaways

  • Unbiasedness: E(θˉ)=θE(\bar{\theta}) = \theta; bias can sometimes be corrected (e.g., s2s^2 with n1n-1).
  • Efficiency: prefer unbiased estimators with smaller standard error.
  • Consistency: larger samples give more precise estimates.
  • Sufficiency: use every data point in the estimate.
  • Sample mean xˉ\bar{x} and sample proportion pˉ\bar{p} satisfy all four properties.

Sampling Error

The inevitable deviation of a single sample from the population due to random chance. It is unavoidable when taking a probability sample; we quantify it with the standard error of the estimator. Increasing sample size reduces sampling error.

Non‑sampling Errors

Errors that arise from causes unrelated to random sampling. They introduce bias and can mislead decisions regardless of sample size.

TypeDescriptionExample (Basaraju's customer survey)
Coverage errorThe sampled population does not match the target population.Surveying only current customers ignores competitors’ customers and non‑customers — the real growth opportunity.
Non‑response errorSome segments are over‑ or under‑represented due to differing response rates.In‑store surveys miss online customers; online surveys miss in‑store customers. Response rates may not reflect actual purchasing proportions.
Measurement errorResponses are inaccurate due to question design, interviewer influence, or respondent dishonesty.Non‑anonymous forms; staff watching customers fill forms; confusing online questions; rushed or dishonest answers.

Reducing Non‑sampling Errors

  1. Define the target population precisely before drawing the sample.
  2. Design the data collection process carefully and train collectors.
  3. Pre‑test the data collection procedure (pilot study) to identify and fix issues.
  4. Choose an appropriate sampling method (stratified, cluster, systematic) to ensure key variables are reflected in the sample.

Key takeaways

  • Sampling error is random and manageable via sample size; non‑sampling errors are systematic.
  • Three major non‑sampling errors: coverage, non‑response, measurement.
  • Non‑sampling errors cannot be fixed by increasing sample size — they require careful study design.
  • Good point estimators quantify sampling error (standard error); reducing non‑sampling errors is a separate, critical step for valid inference.

Statistical Inference

Intuition and Construction

The sampling distribution of the sample mean xˉ\bar{x} is approximately normal (Central Limit Theorem) with mean μ\mu and standard error σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}.
For a normal distribution, 95% of all xˉ\bar{x} values lie within ±1.96σxˉ\pm 1.96\sigma_{\bar{x}} of μ\mu.

Now consider forming an interval around any observed xˉ\bar{x}:
xˉ±1.96σxˉ\bar{x} \pm 1.96\sigma_{\bar{x}}

If that particular xˉ\bar{x} is within 1.96σxˉ1.96\sigma_{\bar{x}} of μ\mu, then the interval will contain μ\mu; if xˉ\bar{x} is farther away (in the 5% tails), the interval will not contain μ\mu.
Because 95% of all possible xˉ\bar{x} are close enough, 95% of all such intervals will capture the true population mean. This is the core idea of a confidence interval.

Formal definition (σ known): A 100(1α)%100(1-\alpha)\% confidence interval for μ\mu is
xˉ±zα/2σn\bar{x} \pm z_{\alpha/2}\,\frac{\sigma}{\sqrt{n}} where 1α1-\alpha is the confidence coefficient and zα/2z_{\alpha/2} is the critical value from the standard normal distribution (area α/2\alpha/2 in the upper tail).

The term zα/2σnz_{\alpha/2}\,\frac{\sigma}{\sqrt{n}} is the margin of error.

Worked Example: Basavaraju's Customer Satisfaction Scores

  • Population standard deviation σ=5\sigma = 5 (historical value)
  • Sample size n=36n = 36σxˉ=536=0.833\sigma_{\bar{x}} = \frac{5}{\sqrt{36}} = 0.833
  • Sample mean xˉ=57.31\bar{x} = 57.31

For any confidence level, the interval is xˉ±zα/2×0.833\bar{x} \pm z_{\alpha/2} \times 0.833.

Confidence Levelzα/2z_{\alpha/2}Margin of ErrorConfidence Interval
80%1.281.07(56.24,58.38)(56.24,\,58.38)
90%1.641.37(55.94,58.68)(55.94,\,58.68)
95%1.961.63(55.68,58.94)(55.68,\,58.94)
99%2.582.15(55.16,59.46)(55.16,\,59.46)

How to obtain zα/2z_{\alpha/2}: Use the standard normal table (or inverse‑normal function).

  • For 95% confidence, α=0.05\alpha = 0.05, α/2=0.025\alpha/2 = 0.025z0.025=1.96z_{0.025} = 1.96
  • For 99% confidence, α=0.01\alpha = 0.01, α/2=0.005\alpha/2 = 0.005z0.005=2.58z_{0.005} = 2.58
  • For 90% confidence, α=0.10\alpha = 0.10, α/2=0.05\alpha/2 = 0.05z0.05=1.64z_{0.05} = 1.64
  • For 80% confidence, α=0.20\alpha = 0.20, α/2=0.10\alpha/2 = 0.10z0.10=1.28z_{0.10} = 1.28

Effect of the Confidence Coefficient

  • Higher confidence → wider interval (larger zα/2z_{\alpha/2}).
    A 99% interval is wider than a 90% interval because we need to cover more of the sampling distribution.
  • 100% confidence would require z=z = \infty, producing an interval (,)(-\infty, \infty) → useless.
  • Choosing a confidence level is a trade‑off: higher confidence gives more assurance that the interval contains μ\mu, but at the cost of precision (wider interval). The decision depends on the cost of being wrong:
    • Critical applications (e.g., FDA drug approval) often require 95% or 99% intervals.
    • For exploratory or low‑stakes decisions, 80% or 90% may be acceptable.
  • Consistency: When comparing different intervals, always use the same confidence coefficient.

Exam tip: A 95% confidence interval does not mean “there is a 95% probability that μ\mu lies in this particular interval.” It means that if we repeated the sampling process many times, 95% of the resulting intervals would contain μ\mu.

Effect of Sample Size

The margin of error is zα/2σnz_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}.

  • Larger nn → smaller margin of error (more precise estimate).
  • Because n\sqrt{n} appears in the denominator, doubling nn reduces the margin by a factor of 2\sqrt{2} (not by half).
  • Conversely, to achieve a desired margin of error, we can solve for the required sample size (covered later).

Key Takeaways

  • The confidence interval for μ\mu (σ known) is xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}}.
  • 95% of all intervals constructed this way contain μ\mu; the confidence level describes the long‑run success rate.
  • Increasing the confidence level widens the interval; increasing sample size narrows it.
  • The choice of confidence level (80%, 90%, 95%, 99%) depends on the context and the cost of being wrong.
  • Always compute intervals with a fixed confidence coefficient when comparing results.

Confidence Intervals for the Mean (σ Known)

A confidence interval (CI) for the population mean μ\mu quantifies the uncertainty around the sample mean xˉ\bar{x}. When the population standard deviation σ\sigma is known, the interval is built using the standard normal (zz) distribution.

The formula:

xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}
  • 1α1-\alpha = confidence coefficient (e.g., 0.95).
  • zα/2z_{\alpha/2} = zz-value that cuts off area α/2\alpha/2 in the upper tail of the standard normal.
  • σn\frac{\sigma}{\sqrt{n}} = standard error of xˉ\bar{x}, denoted σxˉ\sigma_{\bar{x}}.

Why it works

Because xˉ\bar{x} is normally distributed (exactly if population is normal, approximately by the CLT for n30n \geq 30) with mean μ\mu and SD σxˉ\sigma_{\bar{x}}, the standardized variable

z=xˉμσxˉz = \frac{\bar{x} - \mu}{\sigma_{\bar{x}}}

follows a standard normal distribution. Hence, for a given 1α1-\alpha, we can find zα/2z_{\alpha/2} such that P(zα/2zzα/2)=1αP(-z_{\alpha/2} \leq z \leq z_{\alpha/2}) = 1-\alpha, which rearranges to the CI above.

Assumptions

  • Independent random sample.
  • σ\sigma known (e.g., from historical data).
  • Either n30n \geq 30 or the population itself is normally distributed.

Worked Example 1 – Large Sample (n=50n=50)

Amit’s laddu shop: n=50n=50, xˉ=2200\bar{x}=2200, σ=84\sigma=84 (known).

Confidence Levelzα/2z_{\alpha/2}Margin of Error =zα/2σn= z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}CI
80%1.281.28×8450=15.221.28 \times \frac{84}{\sqrt{50}} = 15.22(2184.78, 2215.22)(2184.78,\ 2215.22)
95%1.961.96×11.88=23.281.96 \times 11.88 = 23.28(2176.72, 2223.28)(2176.72,\ 2223.28)

Exam tip: Increasing the confidence level (e.g., 80% → 95%) widens the interval because the margin of error grows with zα/2z_{\alpha/2}.

Worked Example 2 – Small Sample, Known σ\sigma (n=10n=10)

Puneet’s spa: n=10n=10, xˉ=3600\bar{x}=3600, σ=500\sigma=500 (known). Since nn is small, we must assume the population is normally distributed for xˉ\bar{x} to be normal.

σxˉ=50010158.11\sigma_{\bar{x}} = \frac{500}{\sqrt{10}} \approx 158.11
Confidence Levelzα/2z_{\alpha/2}Margin of ErrorCI
95%1.961.96×158.11309.901.96 \times 158.11 \approx 309.90(3290.10, 3909.90)(3290.10,\ 3909.90)
99%2.582.58×158.11407.272.58 \times 158.11 \approx 407.27(3192.73, 4007.27)(3192.73,\ 4007.27)

Interpretation: “99% of such intervals will contain the true population mean μ\mu.” The margin of error increases with higher confidence.

Verifying normality: Plot sample data or use prior knowledge.

Key Takeaways (σ Known)

  • CI for μ\mu when σ\sigma is known: xˉ±zα/2σ/n\bar{x} \pm z_{\alpha/2} \cdot \sigma/\sqrt{n}.
  • Rely on normal distribution of xˉ\bar{x} (CLT for large nn, population normality for small nn).
  • Larger confidence level → larger zα/2z_{\alpha/2} → wider interval.
  • Standard error σxˉ=σ/n\sigma_{\bar{x}} = \sigma/\sqrt{n}.

Confidence Intervals for the Mean (σ Unknown)

In most real problems σ\sigma is unknown and must be estimated from the sample. Using the sample standard deviation ss in place of σ\sigma introduces extra uncertainty. The correct sampling distribution is the Student’s tt-distribution, not the standard normal.

Why can’t we just replace σ\sigma with ss and keep using zz?
The quantity xˉμs/n\frac{\bar{x} - \mu}{s/\sqrt{n}} is not standard normal because ss is a random variable. Its distribution is a tt-distribution with n1n-1 degrees of freedom.

Formula

xˉ±tα/2, n1sn\bar{x} \pm t_{\alpha/2,\ n-1} \cdot \frac{s}{\sqrt{n}}
  • tα/2, n1t_{\alpha/2,\ n-1} = critical value from a tt-distribution with n1n-1 degrees of freedom (df).
  • ss = sample standard deviation.
  • Margin of error: ts/nt \cdot s/\sqrt{n}.

Properties of the tt-distribution

  • Bell-shaped, symmetric about 0 (like zz).
  • Flatter (more spread) than the standard normal, reflecting the extra uncertainty.
  • As df increases (nn grows), the tt-distribution converges to the standard normal.
  • Developed by William Gosset (working at Guinness).

Assumptions for Valid Use of tt

  • Random sample.
  • Population is approximately normally distributed (the tt procedure is robust to mild deviations, especially for n30n \geq 30).
  • No requirement to know σ\sigma.

Comparison: σ\sigma Known vs. σ\sigma Unknown

Aspectσ\sigma Knownσ\sigma Unknown
Critical valuezα/2z_{\alpha/2}tα/2, n1t_{\alpha/2,\ n-1}
Std. errorσ/n\sigma/\sqrt{n}s/ns/\sqrt{n}
Distribution of xˉμSE\frac{\bar{x}-\mu}{\text{SE}}Standard normaltt with n1n-1 df
Sample size requirementn30n \geq 30 or normal pop.nn any size (but normality important for small nn)

Exam tip: Always check whether σ\sigma is known. If “population standard deviation is given” → zz. If “sample standard deviation ss” → tt with n1n-1 df. The exam will often test this distinction.

Key Takeaways (σ Unknown)

  • Use tt-distribution with n1n-1 df when σ\sigma is unknown and estimated by ss.
  • Formula: xˉ±tα/2, n1s/n\bar{x} \pm t_{\alpha/2,\ n-1} \cdot s/\sqrt{n}.
  • tt-distribution is wider than zz, giving larger margins of error for the same confidence level (especially for small nn).
  • Assumption of population normality is important for small samples; the procedure is robust for larger nn.
  • As nn increases, tzt \approx z and the two methods converge.

Confidence Intervals for Population Mean: σ Unknown

When the population standard deviation σ is unknown — the realistic case — we replace σ with the sample standard deviation ss and use the t-distribution with n1n-1 degrees of freedom instead of the standard normal. The structure remains identical: point estimate ± margin of error.

Margin of error (σ unknown): E=tα/2,n1snE = t_{\alpha/2, \, n-1} \cdot \frac{s}{\sqrt{n}}

Confidence interval: xˉ±tα/2,n1sn\bar{x} \pm t_{\alpha/2, \, n-1} \cdot \frac{s}{\sqrt{n}}

The t‑distribution is slightly wider than the normal for small nn (heavy tails), reflecting the extra uncertainty from estimating σ.


Worked Example 1: Joti Hegde’s Salary Survey

Data summary (n = 103)

  • Sample mean xˉ=25.92\bar{x} = 25.92 lakhs
  • Sample standard deviation s=3.66s = 3.66 lakhs
  • Standard error: sn=3.66103=0.361\displaystyle \frac{s}{\sqrt{n}} = \frac{3.66}{\sqrt{103}} = 0.361

90% confidence interval (α=0.10\alpha = 0.10, α/2=0.05\alpha/2 = 0.05, df = 102)

  • t0.05,102=1.66t_{0.05, 102} = 1.66
  • E=1.66×0.361=0.60E = 1.66 \times 0.361 = 0.60
  • Interval: 25.92±0.60[25.32,  26.52]25.92 \pm 0.60 \rightarrow [25.32,\; 26.52] lakhs

95% confidence interval (α=0.05\alpha = 0.05, α/2=0.025\alpha/2 = 0.025, df = 102)

  • t0.025,102=1.98t_{0.025, 102} = 1.98
  • E=1.98×0.361=0.72E = 1.98 \times 0.361 = 0.72
  • Interval: 25.92±0.72[25.20,  26.64]25.92 \pm 0.72 \rightarrow [25.20,\; 26.64] lakhs

Exam tip: The only change from σ known to σ unknown is swapping zα/2z_{\alpha/2} for tα/2,n1t_{\alpha/2, n-1} and using ss in place of σ. The mechanics are identical.


Worked Example 2: Hanumantha Pai’s Credit Card Expenditure

Data summary (n = 55)

  • Sample mean xˉ=3, ⁣852.11\bar{x} = 3,\!852.11
  • Sample standard deviation s=1, ⁣454.23s = 1,\!454.23
  • Standard error: sn=1, ⁣454.2355=196.09\displaystyle \frac{s}{\sqrt{n}} = \frac{1,\!454.23}{\sqrt{55}} = 196.09

80% confidence interval (α=0.20\alpha = 0.20, α/2=0.10\alpha/2 = 0.10, df = 54)

  • t0.10,54=1.3t_{0.10, 54} = 1.3
  • E=1.3×196.09=254.41E = 1.3 \times 196.09 = 254.41
  • Interval: 3, ⁣852.11±254.41[3, ⁣597.70,  4, ⁣106.52]3,\!852.11 \pm 254.41 \rightarrow [3,\!597.70,\; 4,\!106.52]

95% confidence interval (α=0.05\alpha = 0.05, α/2=0.025\alpha/2 = 0.025, df = 54)

  • t0.025,54=2.0t_{0.025, 54} = 2.0
  • E=2.0×196.09=393.13E = 2.0 \times 196.09 = 393.13
  • Interval: 3, ⁣852.11±393.13[3, ⁣458.98,  4, ⁣245.24]3,\!852.11 \pm 393.13 \rightarrow [3,\!458.98,\; 4,\!245.24]

Notice: a higher confidence level (95% vs. 80%) produces a wider margin of error, as expected.


When Is the t‑Interval Exact? (Reliability & Sample Size)

Population shapeSample sizeValidity of t‑interval
NormalAny nnExact – the formula is exact.
Approximately symmetric, bell‑shapedSmall (n15n \geq 15)Good approximation – often adequate.
Moderately skewed, no outliersn30n \geq 30Adequate approximation – safe rule of thumb.
Highly skewed or contains outliersn50n \geq 50Needed approximation – increase nn to improve.

In practice, for n30n \geq 30 the t‑interval works well for most populations unless the distribution is severely non‑normal.


Determining the Sample Size for a Desired Margin of Error (σ Known)

Sample size planning happens before data collection. We want the smallest nn that yields a pre‑specified margin of error EE at a chosen confidence level.

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

Since σ is usually unknown before sampling, use a planning value for σ:

  1. Historical data – σ from a previous study.
  2. Pilot study – collect a small preliminary sample and use its ss.
  3. Range/4 ruleσ(maxmin)/4\sigma \approx (\text{max} - \text{min}) / 4 (crude but simple).

Example: Basavaraju’s Customer Satisfaction

  • Historical σ = 5
  • Desired 99% confidence interval (z0.005=2.58z_{0.005} = 2.58)
  • Desired margin of error E=1E = 1

n=(2.58×51)2=(12.9)2=166.41n=166n = \left( \frac{2.58 \times 5}{1} \right)^2 = (12.9)^2 = 166.41 \rightarrow n = 166

Thus Basavaraju should have collected a sample of 166 (instead of 36) to achieve a 99% CI with margin ±1.

Exam tip: Always round the sample size up to the next integer (e.g., 165.8 → 166). A fraction gives a margin larger than desired.


Key Takeaways

  • When σ is unknown, use the t‑distribution with n1n-1 degrees of freedom and ss in the margin of error.
  • The t‑interval is exact if the population is normal; for non‑normal populations, n30n \geq 30 (or n50n \geq 50 for strong skew/outliers) produces good approximations.
  • To plan sample size for a desired margin of error EE (σ known case), use n=(zα/2σ/E)2n = (z_{\alpha/2} \cdot \sigma / E)^2, with a planning value for σ.
  • A higher confidence level or a smaller desired EE requires a larger sample size.

Confidence Interval for Population Proportion

A confidence interval for a population proportion pp estimates the unknown true proportion of "successes" in the population based on a sample. Intuitively: if 47% of sampled customers are satisfied, the true proportion is likely within a range around that value, with a stated level of confidence.

The general form is the same as for the mean:

Sample estimate±Margin of error\text{Sample estimate} \pm \text{Margin of error}

Here the sample estimate is the sample proportion pˉ=xn\bar{p} = \frac{x}{n} (where xx = number of successes in the sample), and the margin of error depends on the sampling distribution of pˉ\bar{p}.

Sampling Distribution of pˉ\bar{p}

  • pˉ\bar{p} is a binomial random variable (xx successes out of nn trials).
  • For large nn, the binomial is approximated by a normal distribution.
  • Condition for approximation: np5np \ge 5 and nq5nq \ge 5, where q=1pq = 1-p.
  • The sampling distribution is centered at the population proportion pp with standard error:
σpˉ=p(1p)n\sigma_{\bar{p}} = \sqrt{\frac{p(1-p)}{n}}

Exam tip: Always check npˉ5n\bar{p} \ge 5 and n(1pˉ)5n(1-\bar{p}) \ge 5 to validate the normal approximation. If the condition fails, the confidence interval may be unreliable.

Margin of Error and Confidence Interval

If pˉ\bar{p} is approximately normal, the margin of error for a confidence level (1α)(1-\alpha) is zα/2σpˉz_{\alpha/2} \cdot \sigma_{\bar{p}}. However, σpˉ\sigma_{\bar{p}} depends on the unknown pp. The solution is to use pˉ\bar{p} as an estimate for pp in the standard error:

Margin of error=zα/2pˉ(1pˉ)n\text{Margin of error} = z_{\alpha/2} \cdot \sqrt{\frac{\bar{p}(1-\bar{p})}{n}}

Thus, a (1α)(1-\alpha) confidence interval for pp is:

pˉ±zα/2pˉ(1pˉ)n\bar{p} \pm z_{\alpha/2} \sqrt{\frac{\bar{p}(1-\bar{p})}{n}}

where zα/2z_{\alpha/2} is the zz-score cutting off area α/2\alpha/2 in the upper tail of the standard normal distribution.

Worked Example 1: Basavaraju's Customer Satisfaction

  • Sample size n=36n = 36, number of successes x=17x = 17 (score 60\ge 60).
  • pˉ=17/36=0.47\bar{p} = 17/36 = 0.47.
  • For a 95% confidence interval (α=0.05\alpha = 0.05): z0.025=1.96z_{0.025} = 1.96.
  • Compute pˉ(1pˉ)/n=0.47×0.53/360.08\sqrt{\bar{p}(1-\bar{p})/n} = \sqrt{0.47 \times 0.53 / 36} \approx 0.08.
  • Margin of error =1.96×0.08=0.16= 1.96 \times 0.08 = 0.16.
  • 95% CI: 0.47±0.16(0.31,  0.64)0.47 \pm 0.16 \Rightarrow (0.31,\;0.64).

Worked Example 2: Hanumantha's Credit Card Spend

  • n=55n = 55 customers. Number spending less than ₹3000: x=16x = 16.
  • pˉ=16/550.29\bar{p} = 16/55 \approx 0.29.
  • pˉ(1pˉ)/n=0.29×0.71/550.06\sqrt{\bar{p}(1-\bar{p})/n} = \sqrt{0.29 \times 0.71 / 55} \approx 0.06.

80% confidence interval (α=0.20\alpha=0.20, z0.10=1.28z_{0.10}=1.28):

  • Margin of error =1.28×0.06=0.08= 1.28 \times 0.06 = 0.08.
  • CI: 0.29±0.08(0.21,  0.37)0.29 \pm 0.08 \Rightarrow (0.21,\;0.37).

99% confidence interval (α=0.01\alpha=0.01, z0.005=2.58z_{0.005}=2.58):

  • Margin of error =2.58×0.060.16= 2.58 \times 0.06 \approx 0.16.
  • CI: 0.29±0.16(0.13,  0.45)0.29 \pm 0.16 \Rightarrow (0.13,\;0.45).

The 99% interval is much wider – a trade-off between higher confidence and precision.

Sample Size Determination for a Desired Margin of Error

To achieve a desired margin of error EE (e.g., 0.050.05) at a given confidence level, solve for nn in the margin-of-error formula:

n=(zα/2)2pˉ(1pˉ)E2n = \frac{(z_{\alpha/2})^2 \cdot \bar{p}(1-\bar{p})}{E^2}

But pˉ\bar{p} is unknown before sampling. A planning value pp^* must be used. Options:

  1. Use the sample proportion from a previous study.
  2. Conduct a pilot study and use its pˉ\bar{p}.
  3. Use a best guess / judgment.
  4. If no information, use p=0.5p^* = 0.5 (the most conservative – gives the largest nn).

Exam tip: Using p=0.5p^* = 0.5 yields the maximum possible sample size for a given EE and zz, because p(1p)p(1-p) is maximized at p=0.5p=0.5. This ensures the actual margin of error will not exceed EE even if the true proportion is far from 0.5.

flowchart TD
    A[Want sample size for margin E] --> B[Choose p*]
    B --> C[Previous study?]
    B --> D[Pilot study?]
    B --> E[Best guess?]
    B --> F[None -> p* = 0.5]
    C --> G[Use that p*]
    D --> G
    E --> G
    F --> G
    G --> H[n = (z^2 * p*(1-p*)) / E^2]
    H --> I[Round up to next integer]

Example: Hanumantha's desired margin E=0.05E=0.05 at 99% confidence

  • z0.005=2.58z_{0.005} = 2.58, E=0.05E = 0.05.
  • Use planning value p=0.5p^* = 0.5 (conservative).
  • n=(2.58)2×0.5×0.5(0.05)2=6.6564×0.250.0025=665.64666n = \frac{(2.58)^2 \times 0.5 \times 0.5}{(0.05)^2} = \frac{6.6564 \times 0.25}{0.0025} = 665.64 \rightarrow 666.

With only n=55n=55, the margin of error was 0.16; a sample of 666 would achieve the desired 0.05.

Key takeaways

  • Confidence interval for pp: pˉ±zα/2pˉ(1pˉ)/n\bar{p} \pm z_{\alpha/2}\sqrt{\bar{p}(1-\bar{p})/n}, valid when npˉ5n\bar{p} \ge 5 and n(1pˉ)5n(1-\bar{p}) \ge 5.
  • The margin of error uses pˉ\bar{p} as a substitute for unknown pp in the standard error.
  • Higher confidence levels widen the interval; larger sample sizes narrow it.
  • To determine sample size, use a planning value pp^* (previous data, pilot, guess, or 0.50.5).
  • p=0.5p^* = 0.5 is the safest (most conservative) choice, maximizing the required nn.

Confidence Interval for Population Variance

We now construct a confidence interval (CI) for the population variance σ2\sigma^2 (or standard deviation σ\sigma). The key insight: while the sample variance s2s^2 is our best point estimate, its sampling distribution is not symmetric, so the CI cannot be written as “s2±s^2 \pm margin of error”. Instead we use the chi-square distribution.

Intuition and the Sampling Distribution

If the population is normally distributed, the random variable

(n1)s2σ2\frac{(n-1)s^2}{\sigma^2}

follows a chi-square distribution with n1n-1 degrees of freedom:

(n1)s2σ2χn12.\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}.

This is the pivot we invert to obtain a CI for σ2\sigma^2.

Formula for the Confidence Interval

Choose a confidence coefficient 1α1-\alpha. Let χα/22\chi^2_{\alpha/2} and χ1α/22\chi^2_{1-\alpha/2} be the critical values from the χn12\chi^2_{n-1} distribution such that

P ⁣(χ1α/22(n1)s2σ2χα/22)=1α.P\!\left(\chi^2_{1-\alpha/2} \le \frac{(n-1)s^2}{\sigma^2} \le \chi^2_{\alpha/2}\right) = 1-\alpha.

Rearranging (taking reciprocals, multiplying by (n1)s2(n-1)s^2) gives the CI:

Definition
(n1)s2χα/22σ2(n1)s2χ1α/22\frac{(n-1)s^2}{\chi^2_{\alpha/2}} \le \sigma^2 \le \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}} where χα/22\chi^2_{\alpha/2} and χ1α/22\chi^2_{1-\alpha/2} are from χn12\chi^2_{n-1}.

To obtain a CI for σ\sigma, take square roots of the endpoints.

Worked Example: Basavaraju’s Customer Satisfaction Survey (95% CI)

Given:
n=36,  s=6.38,  s2=40.7,  1α=0.95n=36,\; s=6.38,\; s^2=40.7,\; 1-\alpha=0.95.

Step 1 – Degrees of freedom: df=n1=35df = n-1 = 35.

Step 2 – Critical values (from chi-square table or template):

Tail probability (α\alpha)Value
α/2=0.025\alpha/2 = 0.025χ0.0252=53.20\chi^2_{0.025}=53.20
1α/2=0.9751-\alpha/2 = 0.975χ0.9752=20.57\chi^2_{0.975}=20.57

Thus 95%95\% of χ352\chi^2_{35} lies between 20.5720.57 and 53.2053.20.

Step 3 – Plug into formula:

(35)(40.7)53.20σ2(35)(40.7)20.57\frac{(35)(40.7)}{53.20} \le \sigma^2 \le \frac{(35)(40.7)}{20.57} 26.79σ269.30.26.79 \le \sigma^2 \le 69.30.

Step 4 – CI for σ\sigma:
Take square roots:

26.79σ69.305.18σ8.33.\sqrt{26.79} \le \sigma \le \sqrt{69.30} \quad\Rightarrow\quad 5.18 \le \sigma \le 8.33.

Exam tip: Because the chi‑square distribution is not symmetric, we cannot write the interval as s2±s^2 \pm something. This is a common trick – the CI for variance is always of the form ((n1)s2/χupper2,  (n1)s2/χlower2)( (n-1)s^2\,/\,\chi^2_{\text{upper}} ,\; (n-1)s^2\,/\,\chi^2_{\text{lower}} ).

Varying Confidence Levels: 80% and 90% CI

For the same Basavaraju data, we can compute intervals at other confidence levels. The process and critical values change.

80% CI (1α=0.801-\alpha=0.80)

α/2=0.10\alpha/2=0.10, 1α/2=0.901-\alpha/2=0.90.

Tail probabilityValue
0.900.90χ0.902=24.8\chi^2_{0.90}=24.8
0.100.10χ0.102=46.06\chi^2_{0.10}=46.06

Computation:

35×40.746.06σ235×40.724.8\frac{35 \times 40.7}{46.06} \le \sigma^2 \le \frac{35 \times 40.7}{24.8} 30.95σ257.495.56σ7.58.30.95 \le \sigma^2 \le 57.49 \quad\Rightarrow\quad 5.56 \le \sigma \le 7.58.

90% CI (1α=0.901-\alpha=0.90)

α/2=0.05\alpha/2=0.05, 1α/2=0.951-\alpha/2=0.95.

Tail probabilityValue
0.950.95χ0.952=22.47\chi^2_{0.95}=22.47
0.050.05χ0.052=49.80\chi^2_{0.05}=49.80

Computation:

35×40.749.80σ235×40.722.47\frac{35 \times 40.7}{49.80} \le \sigma^2 \le \frac{35 \times 40.7}{22.47} 28.62σ263.465.35σ7.97.28.62 \le \sigma^2 \le 63.46 \quad\Rightarrow\quad 5.35 \le \sigma \le 7.97.

Observation: As confidence increases, the interval widens, just as with means and proportions.

Example: Jyothi Hegde’s Salary Data

Given:
n=103,  xˉ=25.92 lakhs,  s=3.66 lakhs,  s2=13.39 lakhs2n=103,\; \bar{x}=25.92\ \text{lakhs},\; s=3.66\ \text{lakhs},\; s^2=13.39\ \text{lakhs}^2, 1α=0.951-\alpha=0.95.

df=102df = 102. Critical values:

Tail probabilityValue
α/2=0.025\alpha/2=0.025χ0.0252=131.84\chi^2_{0.025}=131.84
1α/2=0.9751-\alpha/2=0.975χ0.9752=75.95\chi^2_{0.975}=75.95

CI for σ2\sigma^2:

102×13.39131.84σ2102×13.3975.95\frac{102 \times 13.39}{131.84} \le \sigma^2 \le \frac{102 \times 13.39}{75.95} 10.36σ217.98.10.36 \le \sigma^2 \le 17.98.

CI for σ\sigma:

3.22σ4.24 lakhs.3.22 \le \sigma \le 4.24\ \text{lakhs}.

Process Overview

flowchart LR
  A[Sample: n, s²] --> B[Choose 1-α]
  B --> C[Find χ²_{α/2} and χ²_{1-α/2} from χ²_{n-1}]
  C --> D[Compute (n-1)s² / χ²_{α/2}  and  (n-1)s² / χ²_{1-α/2}]
  D --> E[CI for σ², then take √ for σ]

Key Takeaways

  • Assumption: Population must be normally distributed for the chi‑square pivot to be exact.
  • Formula: (n1)s2χα/22σ2(n1)s2χ1α/22\displaystyle \frac{(n-1)s^2}{\chi^2_{\alpha/2}} \le \sigma^2 \le \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}}.
  • Asymmetry: Because χ2\chi^2 is not symmetric, the CI is not of the form s2±s^2 \pm margin of error.
  • Critical values: Always use the upper‑tail critical value χα/22\chi^2_{\alpha/2} in the denominator of the left endpoint and the lower‑tail value χ1α/22\chi^2_{1-\alpha/2} in the denominator of the right endpoint.
  • Standard deviation CI: Simply take square roots of the variance CI endpoints.
  • Interpretation: Over repeated sampling, 100(1α)%100(1-\alpha)\% of such intervals will contain the true σ2\sigma^2.

Hypothesis Testing – Introduction

Statistical inference goes beyond confidence intervals. Hypothesis tests use sample data to decide whether a claim about a population parameter (mean μ\mu, proportion pp, or variance σ2\sigma^2) is plausible. The logic mirrors confidence intervals: we make an inference about a population from limited sample evidence, because the decisions that follow will affect the entire population, not just the sample.

Purpose and logic

The core question: Does the sample provide enough evidence to support a specific statement about a population parameter? Typical claims:

  • Is μ\mu greater than a certain value?
  • Is μ\mu equal to a certain value?
  • Is μ\mu less than a certain value?

If the evidence is strong, we can confidently act on that claim for the population. If not, we must be cautious.

Null and alternative hypotheses

Every test involves two competing statements:

  • Null hypothesis (H0H_0) – the tentative assumption about the parameter. It represents the status quo or the default position.
  • Alternative hypothesis (HaH_a) – the opposite of H0H_0; it is the claim the test is designed to support.

The test then evaluates whether sample data can reject H0H_0 in favour of HaH_a.

Important: The outcome is never “accept H0H_0”. It is reject H0H_0 or do not reject H0H_0. “Do not reject” means the evidence is insufficient to prove H0H_0 false – it does not prove H0H_0 true.

Two possible outcomes

Sample evidenceDecisionMeaning
Definitive evidence that H0H_0 is falseReject H0H_0The claim (HaH_a) is supported beyond reasonable doubt.
Not definitive; too risky to rejectDo not reject H0H_0Sample is inconclusive; status quo remains.

Legal analogy (Innocent until proven guilty)

The logic of hypothesis testing is exactly the logic of a criminal trial.

  • Null hypothesis (H0H_0): The accused is innocent.
  • Alternative hypothesis (HaH_a): The accused is guilty (the claim brought by the prosecution).
  • Evidence: Sample data (video footage, fingerprints, alibi).
  • Test outcome:
    • If the evidence is convincing beyond reasonable doubt → reject H0H_0 → guilty.
    • If the evidence is not convincing (reasonable doubt remains) → do not reject H0H_0 → innocent until proven guilty.

Note: A “not guilty” verdict does not prove innocence; it only means the prosecution failed to prove guilt. Similarly, failing to reject H0H_0 does not prove H0H_0 is true.

flowchart LR
    A[Sample evidence] --> B{Sufficient to reject H0?}
    B -->|Yes, beyond reasonable doubt| C[Reject H0 → Claim Ha supported]
    B -->|No, reasonable doubt remains| D[Do not reject H0 → Status quo]

Setting up the hypotheses correctly

Two questions guide the setup:

  1. Who is conducting the test and trying to make a claim about the parameter?
  2. What specific claim are they making?

The claim being argued for is always placed in the alternative hypothesis HaH_a. The opposite statement becomes H0H_0.

Example: A manufacturer claims the mean battery life exceeds 100 hours.
– Claim: μ>100\mu > 100 (what they want to prove) → Ha:μ>100H_a: \mu > 100.
– Default (null): μ100\mu \leq 100.

Exam tip: The way hypotheses are stated depends entirely on context. Always identify who wants to prove what before writing H0H_0 and HaH_a.

Errors in hypothesis testing

Because sample evidence is probabilistic, two types of errors can occur:

  • Type I error: Rejecting H0H_0 when it is actually true (false positive).
  • Type II error: Not rejecting H0H_0 when it is actually false (false negative).

The goal is to minimise both, but a trade-off always exists. Quantifying and controlling these errors (similar to confidence level in interval estimation) will be covered in later sections.


Key takeaways

  • Hypothesis tests decide whether a claim about μ\mu, pp, or σ2\sigma^2 is supported by sample data.
  • H0H_0 is the tentative assumption (status quo); HaH_a is the claim being tested.
  • The only decisions are reject H0H_0 (strong evidence) or do not reject H0H_0 (insufficient evidence). Never “accept H0H_0”.
  • Legal analogy: H0H_0 = innocent (presumed true); HaH_a = guilty (must be proven); the verdict mirrors the test outcome.
  • To set hypotheses: ask who is making a claim and what the claim is – the claim goes in HaH_a.
  • Two unavoidable errors exist (Type I and Type II); they will be formalised later.

Types of Hypothesis Tests

Hypothesis tests about a population parameter (here the mean μ\mu) take one of three forms depending on the direction of the claim being tested:

  • Lower‑tail test – claim is μ<A\mu < A
  • Upper‑tail test – claim is μ>A\mu > A
  • Two‑tail test – claim is μA\mu \neq A

The null hypothesis (H0H_0) always contains the equality (\geq, \leq, or ==).
The alternate hypothesis (H1H_1) is the claim the researcher wants to support using sample data.

Test TypeH0H_0H1H_1When to use
Lower‑tailμA\mu \geq Aμ<A\mu < AWant to prove μ\mu is less than AA
Upper‑tailμA\mu \leq Aμ>A\mu > AWant to prove μ\mu is greater than AA
Two‑tailμ=A\mu = AμA\mu \neq AWant to prove μ\mu is different from AA (not specifically smaller or larger)

Exam tip: The equality sign always belongs in H0H_0. Identify the claim first; then write H1H_1 as that claim, and H0H_0 as its opposite (including the equality).

Setting up the hypotheses – two guiding questions

  1. Who is making the claim? (the party using the sample data)
  2. What is the specific claim about μ\mu? (less than, greater than, not equal to)

The answer to question 2 determines the form of H1H_1 and, consequently, the test type.


Worked examples

Example 1: Under‑filling of lentil packets (Lower‑tail test)

  • Context: Consumer Affairs Department suspects packets labelled “500 g” contain less.
  • Claim: μ<500\mu < 500 (the average weight of all packets is deliberately below the label).
  • Sample: n=50n = 50, xˉ=497\bar{x} = 497 g, s=7s = 7 g, significance level α=0.04\alpha = 0.04.
  • Hypotheses: H0:μ500,H1:μ<500H_0: \mu \geq 500, \quad H_1: \mu < 500
  • Decision rule: If the p‑value (probability of observing a sample mean 497\leq 497 when H0H_0 is true) is less than 0.040.04, reject H0H_0 and conclude under‑filling is occurring. Otherwise, the test is inconclusive – the sample does not prove under‑filling.
  • Key point: “Not rejecting H0H_0” does not prove the packets contain 500 g; it only means the evidence is insufficient.

Example 2: Service response time (Upper‑tail test)

  • Context: Geeta Kumari wants to check if mean response time has increased beyond the advertised 48 hours.
  • Claim: μ>48\mu > 48 (the average time exceeds the policy).
  • Sample: n=40n = 40, xˉ=52\bar{x} = 52 h, s=10s = 10 h, α=0.03\alpha = 0.03.
  • Hypotheses: H0:μ48,H1:μ>48H_0: \mu \leq 48, \quad H_1: \mu > 48
  • Decision rule: Reject H0H_0 if p‑value <0.03< 0.03; then corrective action is needed. Otherwise, the data do not prove that response time has increased.

Example 3: Petrol dispensing accuracy (Two‑tail test)

  • Context: Ibrahim Khan worries the pumps dispense an amount different from the requested 30 L (over‑filling hurts profit, under‑filling cheats customers).
  • Claim: μ30\mu \neq 30 (the average amount dispensed is not 30 L).
  • Sample: n=32n = 32, xˉ=30.3\bar{x} = 30.3 L, s=0.5s = 0.5 L, α=0.05\alpha = 0.05.
  • Hypotheses: H0:μ=30,H1:μ30H_0: \mu = 30, \quad H_1: \mu \neq 30
  • Decision rule: Reject H0H_0 if p‑value <0.05< 0.05; then recalibration is required. If not, the sample does not provide enough evidence of a deviation.

What does the p‑value mean?

The p‑value is the probability of observing a sample result as extreme as the one obtained (or more extreme) assuming the null hypothesis is true. A small p‑value (smaller than the chosen α\alpha) indicates that such an extreme result is unlikely under H0H_0, leading to rejection of H0H_0.


Key takeaways

  • Three test forms: lower‑tail (μ<A\mu < A), upper‑tail (μ>A\mu > A), two‑tail (μA\mu \neq A).
  • The claim being tested always goes into H1H_1; equality always stays in H0H_0.
  • The test type determines the direction of “extremeness” for the p‑value calculation.
  • “Not rejecting H0H_0” does not prove H0H_0 is true – only that the evidence is insufficient to support H1H_1.
  • Use the two‑guiding‑question method to set up hypotheses correctly: who is making the claim, and what is the claim?

Hypotheses, Errors, and the Testing Procedure

Every hypothesis test pits two competing claims about a population parameter against each other: the null hypothesis H0H_0 and the alternative hypothesis HaH_a (or H1H_1). Only one of them is true. The test uses sample evidence to decide whether to reject H0H_0 in favour of HaH_a. Because decisions rest on a sample, errors are possible.

Type I and Type II Errors

Decision → <br>Truth ↓Reject H0H_0Do not reject H0H_0
H0H_0 trueType I error (false positive)Correct
HaH_a trueCorrectType II error (false negative)
  • Type I error: rejecting H0H_0 when it is actually true.
    Probability = level of significance α\alpha, chosen by the analyst (common: 0.05, 0.10, 0.01).
    Intuition: crying “wolf” when there is none.

  • Type II error: failing to reject H0H_0 when HaH_a is true.
    Probability = β\beta (not directly controlled, depends on sample size, effect size, and α\alpha).
    Intuition: missing a real effect.

Trade-off: lowering α\alpha reduces Type I error but increases β\beta (and vice‑versa). The only way to reduce both is to increase the sample size.

Exam tip: If the cost of a false claim (Type I) is high – e.g. convicting an innocent person – choose a small α\alpha. If missing a real effect is more costly (Type II), use a larger α\alpha or a bigger sample.

Example – Geeta’s response time
H0:μ48H_0: \mu \le 48 hr, Ha:μ>48H_a: \mu > 48 hr.

  • Type I error: concluding that mean time exceeds 48 hr when it actually is \le48 hr.
  • Type II error: concluding that mean time is \le48 hr when it actually exceeds 48 hr.

Key takeaways

  • Type I = false rejection of H0H_0; probability = α\alpha.
  • Type II = false acceptance of H0H_0 (failure to reject HaH_a); probability = β\beta.
  • α\alpha is set by the analyst; β\beta depends on α\alpha, sample size, and true effect.
  • Trade‑off: small α\alpha → large β\beta; increase sample size to control both.

The Five‑Step Hypothesis Test

flowchart TD
  A[1. State $H_0$ and $H_a$] --> B[2. Choose significance level $\alpha$]
  B --> C[3. Assume $H_0$ true at equality, compute test statistic]
  C --> D{4. P‑value or critical value?}
  D -->|P‑value approach| E[Compute $p$ = P( test stat at least as extreme \| $H_0$ )]
  D -->|Critical value approach| F[Find CV from $\alpha$, compare test stat to rejection region]
  E --> G{ $p < \alpha$ ?}
  F --> G
  G -->|Yes| H[Reject $H_0$]
  G -->|No| I[Do not reject $H_0$]
  H --> J[5. Managerial conclusion]
  I --> J

Step 1 – Hypotheses
Identify H0H_0 (the status quo, often an equality or “≤”/“≥”) and HaH_a (the claim the test seeks to support). Three common forms:

  • Lower‑tail test: H0:μμ0H_0: \mu \ge \mu_0, Ha:μ<μ0H_a: \mu < \mu_0
  • Upper‑tail test: H0:μμ0H_0: \mu \le \mu_0, Ha:μ>μ0H_a: \mu > \mu_0
  • Two‑tail test: H0:μ=μ0H_0: \mu = \mu_0, Ha:μμ0H_a: \mu \neq \mu_0

Step 2 – Significance level
Set α\alpha (maximum acceptable Type I error probability).

Step 3 – Test statistic
Assume H0H_0 true at the boundary (μ=μ0\mu = \mu_0). Use the sample to compute
t=xˉμ0s/nt = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} which follows a tt‑distribution with df=n1df = n-1 (valid when n30n\ge30 or the population is normal).

Step 4 – Decision

  • P‑value approach: Compute pp = probability, under H0H_0, of observing a test statistic as extreme as (or more extreme than) the one obtained.
    • If p<αp < \alpha → reject H0H_0.
    • If pαp \ge \alpha → do not reject H0H_0.
  • Critical value approach: Determine the rejection region from α\alpha; reject if tt falls in that region.
    Both approaches yield the same decision.

Step 5 – Conclusion
Translate the statistical decision into a real‑world interpretation for the decision maker.

Exam tip: “Do not reject H0H_0” is not the same as “accept H0H_0”. It means the sample lacked sufficient evidence to support HaH_a. The test result is inconclusive about H0H_0 being true.

Worked Examples

Example 1 – Jalan Supermarket (lower‑tail)
n=50n=50, xˉ=497\bar{x}=497 g, s=7s=7 g, α=0.04\alpha=0.04 (4%).

  • H0:μ500H_0: \mu \ge 500 (labelling claim), Ha:μ<500H_a: \mu < 500 (underfilling).
  • Test statistic: s/n=7/50=0.99  (1.13 in transcript, using s=8?)s/\sqrt{n} = 7/\sqrt{50}=0.99 \;(1.13\text{ in transcript, using }s=8?)
    Note: transcript used s=8s=8, giving s/n=1.13s/\sqrt{n}=1.13; we follow that for consistency.
    t=4975001.13=2.65t = \frac{497-500}{1.13} = -2.65
  • df=49df = 49, lower‑tail p=P(T492.65)0.005p = P(T_{49} \le -2.65) \approx 0.005.
  • p=0.005<0.04p = 0.005 < 0.04 → reject H0H_0.
  • Conclusion: Sufficient evidence that the mean packet weight is below 500 g; the chain is likely underfilling.

Example 2 – Geeta Kumari (upper‑tail, two scenarios)

  1. Strong evidence (xˉ=52\bar{x}=52, s=10s=10, α=0.03\alpha=0.03):
    s/n=10/40=1.58s/\sqrt{n} = 10/\sqrt{40} = 1.58
    t=52481.58=2.53t = \frac{52-48}{1.58} = 2.53 df=39df=39, upper‑tail p=P(T392.53)0.008p = P(T_{39} \ge 2.53) \approx 0.008
    0.008<0.030.008 < 0.03 → reject H0H_0 → mean response time exceeds 48 hr.

  2. Weak evidence (xˉ=50\bar{x}=50, s=10s=10, α=0.03\alpha=0.03):
    s/n=1.58s/\sqrt{n}=1.58 (unchanged)
    t=50481.58=1.26t = \frac{50-48}{1.58} = 1.26 df=39df=39, p=P(T391.26)0.107p = P(T_{39} \ge 1.26) \approx 0.107
    0.107>0.030.107 > 0.03 → do not reject H0H_0 → insufficient evidence that mean time exceeds 48 hr.

Example 3 – Ibrahim’s petrol pumps (two‑tail)
n=32n=32, xˉ=30.3\bar{x}=30.3 L, s=0.5s=0.5 L, α=0.05\alpha=0.05.

  • H0:μ=30H_0: \mu = 30, Ha:μ30H_a: \mu \neq 30 (pumps may over‑ or under‑fill).
  • s/n=0.5/32=0.0884s/\sqrt{n}=0.5/\sqrt{32}=0.0884
    t=30.3300.0884=3.39t = \frac{30.3-30}{0.0884} = 3.39
  • df=31df=31, two‑tail p=2×P(T313.39)0.002p = 2 \times P(T_{31} \ge 3.39) \approx 0.002 (transcript says p=0.00p=0.00).
  • p<0.05p < 0.05 → reject H0H_0.
  • Conclusion: Evidence that the mean dispensed amount is not 30 L; recalibration is needed.

Key takeaways

  • Hypothesis tests always involve two errors; α\alpha controls Type I, β\beta is managed through design.
  • The five‑step framework works for any population mean test: state hypotheses, choose α\alpha, compute tt‑statistic, obtain pp‑value, draw conclusion.
  • A pp‑value smaller than α\alpha means the observed sample is unlikely under H0H_0 → reject.
  • Three test directions: lower‑tail (negative extreme), upper‑tail (positive extreme), two‑tail (both extremes).
  • Always finish with a real‑world statement of what the decision means for the decision maker.

Hypothesis Testing for Population Mean

Hypothesis testing is a formal procedure to decide whether sample data provide enough evidence to reject a claim about a population parameter. For the mean μ\mu, the process always follows the same skeleton: state hypotheses, compute a test statistic, find the p-value, and compare it to the significance level α\alpha. The test statistic measures how far the sample mean xˉ\bar{x} is from the claimed value under the null hypothesis, in units of standard error.

Three types of tests

The alternative hypothesis (H1H_1 or HaH_a) determines the type of test. The claim being tested is usually placed in H1H_1.

TestH1H_1 formH0H_0 formWhen used
Lower-tail testμ<A\mu < AμA\mu \ge AClaim that mean is less than a threshold (e.g., average lentil weight below labelled weight)
Upper-tail testμ>A\mu > AμA\mu \le AClaim that mean is greater than a threshold (e.g., average service work order completion time exceeds target)
Two-tail testμA\mu \neq Aμ=A\mu = AClaim that mean differs from a specific value (e.g., average petrol pump fill is not exactly 5 litres)

Test statistic (unknown population σ\sigma)

When the population standard deviation σ\sigma is unknown (the usual case), the test statistic follows a tt-distribution with n1n-1 degrees of freedom:

t=xˉAs/nt = \frac{\bar{x} - A}{s / \sqrt{n}}

where ss is the sample standard deviation and AA is the value under H0H_0 at equality.

Computing the p-value

The p-value is the probability, under H0H_0, of obtaining a test statistic as extreme as (or more extreme than) the observed value, in the direction(s) specified by H1H_1.

  • Lower-tail test: p-value=P(Tn1<tobs)\text{p-value} = P(T_{n-1} < t_{\text{obs}})
  • Upper-tail test: p-value=P(Tn1>tobs)\text{p-value} = P(T_{n-1} > t_{\text{obs}})
  • Two-tail test:
    If tobs>0t_{\text{obs}} > 0: p-value=2×P(Tn1>tobs)\text{p-value} = 2 \times P(T_{n-1} > t_{\text{obs}})
    If tobs<0t_{\text{obs}} < 0: p-value=2×P(Tn1<tobs)\text{p-value} = 2 \times P(T_{n-1} < t_{\text{obs}})
    (By symmetry of the tt-distribution, the two-tail p-value is double the one-tail probability in the tail of the observed statistic.)

Decision rule: Reject H0H_0 if p-valueα\text{p-value} \le \alpha (including exact equality). Otherwise, do not reject H0H_0.

Special case: known σ\sigma

If the population standard deviation σ\sigma is known, replace ss with σ\sigma. The test statistic becomes a zz-statistic (standard normal):

z=xˉAσ/nz = \frac{\bar{x} - A}{\sigma / \sqrt{n}}

The p-value is computed from the standard normal distribution (N(0,1)N(0,1)) instead of the tt-distribution. All other steps remain identical.

Key takeaways

  • Hypothesis tests for μ\mu are lower-tail, upper-tail, or two-tail depending on the claim in H1H_1.
  • Test statistic is t=(xˉA)/(s/n)t = (\bar{x} - A) / (s/\sqrt{n}) with n1n-1 df (unknown σ\sigma) or zz (known σ\sigma).
  • p-value = tail probability of the test statistic; two-tail p-value doubles the one-tail probability.
  • Reject H0H_0 if p-valueα\text{p-value} \le \alpha; otherwise fail to reject.

Hypothesis Testing for Population Proportion

Testing a claim about the population proportion pp follows the same logic as for the mean, but uses a different sampling distribution and test statistic. The sample proportion p^\hat{p} is approximately normal for large samples.

Hypotheses and test types

Again, H1H_1 determines the tail. Let p0p_0 be the hypothesized value under H0H_0 at equality.

TestH1H_1 formH0H_0 form
Lower-tailp<p0p < p_0pp0p \ge p_0
Upper-tailp>p0p > p_0pp0p \le p_0
Two-tailpp0p \neq p_0p=p0p = p_0

Test statistic

The sampling distribution of p^\hat{p} is approximately normal with mean pp and standard deviation p(1p)/n\sqrt{p(1-p)/n}, provided nn is large. Under H0H_0 at equality (p=p0p = p_0), the test statistic is a zz-statistic:

z=p^p0p0(1p0)nz = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}

p-value computation

The p-value is computed exactly as for the mean, but using the standard normal distribution N(0,1)N(0,1):

  • Lower-tail: p-value=P(Z<zobs)\text{p-value} = P(Z < z_{\text{obs}})
  • Upper-tail: p-value=P(Z>zobs)\text{p-value} = P(Z > z_{\text{obs}})
  • Two-tail: 2×2 \times the one-tail probability in the direction of zobsz_{\text{obs}}.

Exam tip: For proportions, the test statistic uses p0p_0 in the denominator (under H0H_0), not p^\hat{p}. This differs from the standard error used in confidence intervals for pp, where p^\hat{p} is used.

The decision rule remains the same: reject H0H_0 if p-valueα\text{p-value} \le \alpha.

Key takeaways

  • Hypothesis tests for proportion pp mirror the structure for μ\mu: null vs. alternative, tail choice, p-value comparison.
  • Test statistic is z=(p^p0)/p0(1p0)/nz = (\hat{p} - p_0) / \sqrt{p_0(1-p_0)/n}, using p0p_0 in the denominator.
  • The zz-test is valid when the normal approximation holds (large nn).
  • Reject H0H_0 if p-valueα\text{p-value} \le \alpha; otherwise fail to reject.

Hypothesis Testing for Population Proportion

Hypothesis testing for a population proportion answers whether the true proportion pp of a categorical outcome differs from a hypothesized value p0p_0. The sample proportion pˉ=x/n\bar{p} = x/n serves as the point estimate, and the test checks if the observed deviation from p0p_0 is statistically significant.

The test statistic and its distribution

Under the null hypothesis H0H_0 (assumed true at equality), the sampling distribution of pˉ\bar{p} is approximately normal if
np05andn(1p0)5.n p_0 \ge 5 \quad\text{and}\quad n(1-p_0) \ge 5.

The standard error of pˉ\bar{p} under H0H_0 is
σpˉ=p0(1p0)n.\sigma_{\bar{p}} = \sqrt{\frac{p_0(1-p_0)}{n}}.

The test statistic
z=pˉp0σpˉz = \frac{\bar{p} - p_0}{\sigma_{\bar{p}}}
follows a standard normal distribution N(0,1)N(0,1).

Three forms of the test

Alternative hypothesis HaH_aTest typepp-value
p>p0p > p_0Upper‑tailP(Z>z)P(Z > z)
p<p0p < p_0Lower‑tailP(Z<z)P(Z < z)
pp0p \neq p_0Two‑tailed2×P(Z>z)2 \times P(Z > \lvert z \rvert)

Reject H0H_0 if the pp-value α\le \alpha (the significance level).

Worked examples

Example 1 – Upper‑tail test (Swiggy coupons)

  • Claim (to test): more than 10 % of coupon recipients will use them → Ha:p>0.10H_a: p > 0.10
    H0:p0.10H_0: p \le 0.10
  • Sample: n=80,  x=12n = 80,\; x = 12 used coupons → pˉ=12/80=0.15\bar{p} = 12/80 = 0.15
  • Conditions: 80×0.10=8580 \times 0.10 = 8 \ge 5, 80×0.90=72580 \times 0.90 = 72 \ge 5
  • Standard error: σpˉ=0.10×0.9080=0.03\sigma_{\bar{p}} = \sqrt{\frac{0.10 \times 0.90}{80}} = 0.03
  • Test statistic: z=0.150.100.03=1.49z = \frac{0.15 - 0.10}{0.03} = 1.49
  • pp-value: P(Z>1.49)=0.068P(Z > 1.49) = 0.068
  • Decision: 0.068>α=0.050.068 > \alpha = 0.05 → do not reject H0H_0.

Exam tip: Even though the sample proportion (15 %) is higher than the hypothesized value (10 %), the p‑value exceeds 5 %. The difference is not large enough given the standard error – a reminder that sample evidence must be weighed against sampling variability.

Example 2 – Lower‑tail test (Jhansi sleeper adequacy)

  • Claim (to test): less than 50 % of travellers find sleeper arrangements inadequate → Ha:p<0.50H_a: p < 0.50
    H0:p0.50H_0: p \ge 0.50
  • Sample: n=510n = 510, 280 said adequate, so number finding inadequate = 510280=230510-280 = 230.
    pˉ=230/510=0.45\bar{p} = 230/510 = 0.45 (watch the definition of “success” – here it is inadequate).
  • Conditions: 510×0.50=2555510 \times 0.50 = 255 \ge 5
  • Standard error: σpˉ=0.50×0.50510=0.022\sigma_{\bar{p}} = \sqrt{\frac{0.50 \times 0.50}{510}} = 0.022
  • Test statistic: z=0.450.500.022=2.21z = \frac{0.45 - 0.50}{0.022} = -2.21
  • pp-value: P(Z<2.21)=0.013P(Z < -2.21) = 0.013
  • Decision: 0.013<α=0.030.013 < \alpha = 0.03reject H0H_0.

Exam tip: Carefully define what “success” means for the proportion under test. In this problem the claim is about inadequate arrangements, but the raw data gave the count of adequate – always translate to the outcome of interest.

Example 3 – Two‑tailed test (Noida hotel bookings)

  • Claim (to test): the proportion of fully booked hotels is not 90 % → Ha:p0.90H_a: p \neq 0.90
    H0:p=0.90H_0: p = 0.90
  • Sample: n=70n = 70, 12 have vacancies → 7012=5870-12 = 58 booked → pˉ=58/70=0.83\bar{p} = 58/70 = 0.83
  • Conditions: 70×0.90=63570 \times 0.90 = 63 \ge 5, 70×0.10=7570 \times 0.10 = 7 \ge 5
  • Standard error: σpˉ=0.90×0.1070=0.036\sigma_{\bar{p}} = \sqrt{\frac{0.90 \times 0.10}{70}} = 0.036
  • Test statistic: z=0.830.900.036=1.99z = \frac{0.83 - 0.90}{0.036} = -1.99
  • pp-value: 2×P(Z<1.99)=2×0.023=0.0462 \times P(Z < -1.99) = 2 \times 0.023 = 0.046
  • Decision: 0.046<α=0.050.046 < \alpha = 0.05reject H0H_0.

Key takeaways

  • The test statistic for a proportion is z=(pˉp0)/p0(1p0)/nz = (\bar{p} - p_0) \big/ \sqrt{p_0(1-p_0)/n}.
  • Valid only if np05n p_0 \ge 5 and n(1p0)5n(1-p_0) \ge 5.
  • Three alternatives: >>, <<, \neq; compute the pp-value accordingly.
  • Reject H0H_0 when pp-value α\le \alpha.
  • Watch the definition of success – it must align with the claim.

Hypothesis Testing for Population Variance

Hypothesis testing for a population variance σ2\sigma^2 uses the sample variance s2s^2 to judge whether σ2\sigma^2 differs from a hypothesized value σ02\sigma_0^2. The procedure requires the population to be normally distributed.

The test statistic and its distribution

If the population is normal, the quantity
(n1)s2σ2\frac{(n-1)s^2}{\sigma^2}
follows a chi‑square distribution with n1n-1 degrees of freedom.

Under H0H_0 (assuming σ2=σ02\sigma^2 = \sigma_0^2), the test statistic
χ2=(n1)s2σ02\chi^2 = \frac{(n-1)s^2}{\sigma_0^2}
has a χn12\chi^2_{n-1} distribution.

Three forms of the test

Alternative hypothesis HaH_aTest typepp-value
σ2<σ02\sigma^2 < \sigma_0^2Lower‑tailP(χn12<observed χ2)P(\chi^2_{n-1} < \text{observed } \chi^2)
σ2>σ02\sigma^2 > \sigma_0^2Upper‑tailP(χn12>observed χ2)P(\chi^2_{n-1} > \text{observed } \chi^2)
σ2σ02\sigma^2 \neq \sigma_0^2Two‑tailed2×upper‑tail probability2 \times \text{upper‑tail probability} (as used in lecture)

Reject H0H_0 if pp-value α\le \alpha.

Worked examples

Example 1 (Upper‑tail test – Meerut bus arrival variance)

  • Claim (to test): variance of arrival times is 4\le 4 minutes → (lecture sets Ha:σ2<4H_a: \sigma^2 < 4, but then uses upper‑tail pp-value; shown as given.)
  • H0:σ24,Ha:σ2<4H_0: \sigma^2 \ge 4,\qquad H_a: \sigma^2 < 4
  • Sample: n=24,  s2=4.9n = 24,\; s^2 = 4.9
  • Conditions: population assumed normal ✓
  • Test statistic: χ2=(241)×4.94=23×4.94=28.18\chi^2 = \frac{(24-1) \times 4.9}{4} = \frac{23 \times 4.9}{4} = 28.18
  • pp-value (as computed in lecture): P(χ232>28.18)=0.209P(\chi^2_{23} > 28.18) = 0.209
  • Decision: 0.209>α=0.050.209 > \alpha = 0.05 → do not reject H0H_0.

Note: The lecture treats this as an upper‑tail test despite the alternate hypothesis being σ2<4\sigma^2 < 4. The p‑value is reported as the probability above the test statistic. The conclusion is that the sample does not provide evidence that the variance exceeds 4 minutes.

Example 2 (Two‑tailed test – Gorakhpur driving test scores)

  • Claim (to test): variance of new exam scores differs from historical 100 → Ha:σ2100H_a: \sigma^2 \neq 100
    H0:σ2=100H_0: \sigma^2 = 100
  • Sample: n=30,  s2=162n = 30,\; s^2 = 162
  • Test statistic: χ2=(301)×162100=29×162100=46.98\chi^2 = \frac{(30-1) \times 162}{100} = \frac{29 \times 162}{100} = 46.98
  • pp-value (lecture approach): 2×P(χ292>46.98)=2×0.0185=0.0372 \times P(\chi^2_{29} > 46.98) = 2 \times 0.0185 = 0.037
  • Decision: 0.037<α=0.050.037 < \alpha = 0.05reject H0H_0.

Key takeaways

  • Test on variance uses χ2=(n1)s2/σ02\chi^2 = (n-1)s^2 / \sigma_0^2 with n1n-1 degrees of freedom.
  • Requires normal population.
  • Three forms: lower‑tail, upper‑tail, two‑tailed.
  • For two‑tailed tests, the lecture doubles the upper‑tail probability (note: the chi‑square distribution is not symmetric; this is an approximation).
  • Reject H0H_0 when pp-value α\le \alpha.

Hypothesis Testing for Population Variance

Hypothesis tests for a population variance σ2\sigma^2 are used to judge claims about the dispersion of a normally distributed population – e.g., whether a production process has become too variable or whether a variance equals a specified target σ02\sigma_0^2. The test relies on the chi-square distribution because the sample variance s2s^2 scaled by degrees of freedom follows a χ2\chi^2 distribution under normality.

Test Statistic

Under the null hypothesis H0H_0, assuming a normal population:

χ2=(n1)s2σ02χn12\chi^2 = \frac{(n-1)s^2}{\sigma_0^2} \sim \chi^2_{n-1}

where nn = sample size, s2s^2 = sample variance, σ02\sigma_0^2 = hypothesized value.

Three Types of Tests

The alternative hypothesis determines the type of test and how the p-value is computed.

TypeH0H_0HaH_aP‑value
Lower‑tailσ2=σ02\sigma^2 = \sigma_0^2σ2<σ02\sigma^2 < \sigma_0^2P(χn12computed χ2)P(\chi^2_{n-1} \le \text{computed } \chi^2)
Upper‑tailσ2=σ02\sigma^2 = \sigma_0^2σ2>σ02\sigma^2 > \sigma_0^2P(χn12computed χ2)P(\chi^2_{n-1} \ge \text{computed } \chi^2)
Two‑tailσ2=σ02\sigma^2 = \sigma_0^2σ2σ02\sigma^2 \neq \sigma_0^22×min(2 \times \min()) (area in the smaller tail)

Decision Rule

Compute the test statistic from sample data. Obtain the p‑value based on the χn12\chi^2_{n-1} distribution.
Reject H0H_0 if p-valueα\text{p-value} \le \alpha (the chosen significance level). Otherwise, do not reject H0H_0.

Worked Process (Flowchart)

flowchart TD
  A[State H0 and Ha] --> B[Choose significance level α]
  B --> C[Compute χ² = (n-1)s²/σ₀²]
  C --> D[Find p-value from χ²_{n-1}]
  D --> E{p-value ≤ α?}
  E -->|Yes| F[Reject H0]
  E -->|No| G[Do not reject H0]

Exam tip: The chi‑square test for variance is valid only when sampling from a normal population. Violating this assumption can severely distort the p‑value. Always check normality (e.g., histogram, normal probability plot) before applying this test.

Key takeaways

  • Test statistic: χ2=(n1)s2σ02\chi^2 = \frac{(n-1)s^2}{\sigma_0^2} with n1n-1 degrees of freedom.
  • Three test types: lower‑tail, upper‑tail, two‑tail – choose based on the claim.
  • Decision: reject H0H_0 if p‑value α\le \alpha.
  • Normality of the population is a critical assumption.

Module 5 Recap: Confidence Intervals and Hypothesis Tests

This module used sampling distributions (of xˉ\bar{x}, p^\hat{p}, s2s^2) to perform statistical inference via two complementary approaches: confidence intervals (estimation) and hypothesis tests (decision‑making).

1. Confidence Intervals

For each parameter, a confidence interval provides a range of plausible values at a chosen confidence level.

ParameterPoint estimateForm of intervalDistribution used
μ\muxˉ\bar{x}xˉ±margin of error\bar{x} \pm \text{margin of error}tn1t_{n-1} (or zz if σ\sigma known)
ppp^\hat{p}p^±margin of error\hat{p} \pm \text{margin of error}Standard normal (zz)
σ2\sigma^2s2s^2Direct lower and upper bounds: ((n1)s2χα/22,  (n1)s2χ1α/22)\left( \frac{(n-1)s^2}{\chi^2_{\alpha/2}},\; \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}} \right)χn12\chi^2_{n-1}
  • Sample size determination for μ\mu and pp: set nn to achieve a desired margin of error.

2. Hypothesis Tests

Hypothesis testing answers “Is the population parameter equal to, greater than, or less than a specific value?” Steps:

  1. Identify the claim and who is making it – this guides the structure of H0H_0 and HaH_a (not always symmetric).
  2. Write null and alternative hypotheses based on the claim.
  3. Choose the test statistic according to the parameter and sampling conditions:
    • μ\mu: t=xˉμ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} (or zz if σ\sigma known)
    • pp: z=p^p0p0(1p0)/nz = \frac{\hat{p} - p_0}{\sqrt{p_0(1-p_0)/n}}
    • σ2\sigma^2: χ2=(n1)s2σ02\chi^2 = \frac{(n-1)s^2}{\sigma_0^2} (only under normality)
  4. Compute the p‑value – the probability of obtaining a test statistic as extreme as observed, assuming H0H_0 is true. This is the probability of a Type I error.
  5. Decision: Reject H0H_0 if p‑value α\le \alpha; otherwise do not reject.

Exam tip: When setting up H0H_0 and HaH_a, remember that the claim is often placed in the alternative hypothesis unless it’s a statement of “no difference”. Also, H0H_0 always contains the equality (=,,=, \le, \ge).

Both confidence intervals and hypothesis tests draw conclusions about a population from a single random sample. The next module extends inference to regression – modelling relationships between variables.

Key takeaways

  • Confidence intervals give a range; hypothesis tests give a yes/no verdict.
  • Each parameter uses a specific sampling distribution (tt, zz, χ2\chi^2).
  • The p‑value quantifies the risk of a Type I error; reject H0H_0 when that risk is small (α\le \alpha).
  • Correct formulation of hypotheses is the most common pitfall – always ask “What claim is being tested?”
Study this interactively — ask questions and quiz yourself — in the study app, or see how it connects across the degree in the concept map.