STA169 Statistics I

Statistics ITU Board 2082

What do you understand by correlation analysis? Bradford Electric Illuminating is studying the relationship between kilowatt hours (thousands) used and the number of rooms in a private single family…

10

What do you understand by correlation analysis? Bradford Electric Illuminating is studying the relationship between kilowatt-hours (thousands) used and the number of rooms in a private single-family residence. A random sample of 5 houses yields the following.

Number of rooms
11
9
13
7
10
Kilowatts-hours (thousands) used
9
7
12
4
8

  • i) Find the correlation coefficient between number of rooms and kilowatts-hours used. Also interpret the result.
  • ii) Determine the regression equation of kilowatts-hours used on number of rooms.
  • iii) Estimate the kilowatts-hours used for an 8 rooms house.

Answer

1. Assumptions of Pearson’s Correlation

Pearson’s correlation coefficient () measures the linear relationship between two continuous variables. The key assumptions are:

A. Linearity

  • The relationship between the two variables must be linear. A scatter plot should show a roughly straight-line pattern.
  • Check: Plot (rooms) vs. (kilowatt-hours) to verify linearity.

B. Homoscedasticity (Constant Variance)

  • The variability of should be similar across all values of . No funnel-shaped spread in residuals.
  • Check: Residual plot (after regression) should show random scatter around zero.

C. No Outliers

  • Extreme values can distort . Use z-scores or leverage plots to detect outliers.
  • Check: Inspect the given data for extreme values (e.g., 14 rooms vs. 5 kWh seems plausible).

D. Bivariate Normality

  • Both variables should be approximately normally distributed (or their joint distribution should be bivariate normal).
  • Check: Use Shapiro-Wilk test or Q-Q plots for normality. For small samples (), this is hard to verify but generally assumed if data is symmetric.

E. Independence of Observations

  • Each data point must be independent of others. No repeated measures or clustering.
  • Check: Ensure the 5 houses are randomly sampled without dependence.

2. Pearson’s Correlation Coefficient ()

Given data:

Step 1: Calculate Means

Step 2: Compute Covariance and Standard Deviations

Step 3: Calculate

Interpretation

  • indicates a strong positive linear correlation between the number of rooms and kilowatt-hours used.
  • As the number of rooms increases, electricity consumption tends to increase almost linearly.

3. Regression Equation ()

Step 1: Compute Regression Coefficient ()

Step 2: Compute Intercept ()

Final Regression Equation

Interpretation of

  • The slope () means that for each additional room, kilowatt-hours used increase by 0.769 thousand units (769 units), holding other factors constant.
  • The intercept () suggests that a house with 0 rooms would use 556 kWh, which is unrealistic but mathematically derived from the data.

4. Estimate Kilowatt-Hours for an 8-Room House

Using the regression equation:

Final Answer: 6,708 kWh (rounded to nearest unit).


Verification of Assumptions (Brief)

  1. Linearity: The scatter plot (not shown) would likely show a positive trend, supporting linearity.
  2. Homoscedasticity: With , hard to verify, but no obvious patterns suggest heteroscedasticity.
  3. Outliers: No extreme values distorting the relationship.
  4. Normality: Small sample limits rigorous checks, but the data appears symmetric.
  5. Independence: Random sampling ensures independence.

Python Code for Verification (Optional)

import numpy as np
import pandas as pd
from scipy import stats

# Data
X = np.array([11, 10, 14, 7, 9])
Y = np.array([9, 8, 11, 5, 9])

# Pearson's r
r, p_value = stats.pearsonr(X, Y)
print(f"Pearson's r: {r:.3f}")  # Output: 0.906

# Regression
slope, intercept, r_value, p_value, std_err = stats.linregress(X, Y)
print(f"Regression: Y = {intercept:.3f} + {slope:.3f}X")  # Output: Y = 0.556 + 0.769X

Discussion

Loading…

More Statistics I questions

All Statistics I old questions