Saturday, March 14, 2026

#6a Advance Hypothesis Testing

Advanced Hypothesis Testing - Civil Engineering Statistics

🎓 Advanced Hypothesis Testing

University-Level Statistical Analysis for Civil Engineering
Comprehensive 120-Minute Lecture | Theoretical Foundations + Advanced Applications

📢 Lecture Introduction & Learning Objectives

Welcome to Advanced Hypothesis Testing! This lecture equips you with the statistical decision-making framework used in structural design, geotechnical analysis, and quality control.

Core Question: "Given limited sample data, can we confidently reject design specifications or accept engineering assumptions?"

🎯 University Learning Outcomes

  • Formulate and solve hypothesis tests for means (z, t) and variances (χ², F)
  • Derive test statistics from sampling distributions
  • Apply power analysis and sample size determination
  • Interpret Type I/II errors in civil engineering risk contexts
  • Conduct non-parametric alternatives when normality fails

🎯 Module 1: Theoretical Foundations (20 mins)

1.1 Neyman-Pearson Lemma & Decision Theory

The optimal test maximizes power (1-β) for fixed α using likelihood ratio:

Λ = supθ∈Θ₀ L(θ|x) / supθ∈Θ L(θ|x) ≶ k

1.2 Sampling Distributions & Pivotal Quantities

Central Limit Theorem: √n(x̄ - μ)/(σ/√n) → N(0,1)
t-Distribution: (x̄ - μ)/(s/√n) → tn-1
χ²-Distribution: Σ[(Xi-μ)²/σ²] → χ²n-1

1.3 Comprehensive Error Framework

H₀: μ = μ₀ TrueH₀: μ ≠ μ₀ True
ProbDecisionProbDecision
Region A1-αAcceptβAccept
Region BαReject1-βReject

📊 Module 2: Advanced Tests for Means (30 mins)

2.1 Z-Test: Large Sample Theory & Applications

Z = √n(x̄ - μ₀)/σ ~ N(0,1)
Rejection Region: |Z| > zα/2 (two-tailed)
Power: 1-β = P(Z > zα - √n|μ-μ₀|/σ)
Bridge Load Analysis (n=50):
x̄=422kN, σ=58kN, μ₀=400kN, α=0.05
Z = √50(422-400)/58 = 2.78 > 1.96
p-value: P(Z>2.78) = 0.0027 < 0.05
Power Analysis: For μ=410kN, power=0.87

2.2 T-Test: Small Sample Exact Distribution

T = √n(x̄ - μ₀)/s ~ tn-1
Exact Distribution: Derived from Normal/χ² independence
Concrete Compressive Strength (n=12):
Data: [27.8, 29.2, 30.1, 28.9, 29.7, 30.4, 28.5, 29.8, 30.2, 29.1, 28.7, 29.9]
x̄=29.42MPa, s=0.78MPa, μ₀=30MPa, α=0.05
t11 = √12(29.42-30)/0.78 = -2.45
tcrit(0.025,11) = ±2.201 → REJECT H₀
Conclusion: "Batch fails M30 specification"

2.3 Paired T-Test & Two-Sample Analysis

Paired: t = (d̄ - μD)/(sD/√n)
Two-Sample: t = (x̄₁-x̄₂)/√(sp²(1/n₁+1/n₂))

📈 Module 3: Variance Tests - Theory & Applications (25 mins)

3.1 Chi-Square Test: Exact Distribution

χ² = (n-1)s²/σ₀² ~ χ²n-1
Two-tailed: χ²1-α/2 < χ² < χ²α/2
One-tailed (σ²>σ₀²): χ² > χ²1-α
Geotechnical Soil Test (n=15):
Shear strength s²=3.84kPa², σ₀²=2.25kPa² (CV=25%)
χ²14 = 14×3.84/2.25 = 23.87
Critical: χ²0.025,14=5.63, χ²0.975,14=26.12
5.63 < 23.87 < 26.12 → FAIL TO REJECT
Design Decision: "Soil variability acceptable for foundation"

3.2 F-Test: Ratio of Independent χ² Variables

F = (s₁²/σ₁²)/(s₂²/σ₂²) = s₁²/s₂² ~ Fn₁-1,n₂-1
Decision: F > Fα,n₁-1,n₂-1

🏗️ Module 4: Civil Engineering Applications & Standards (20 mins)

Test TypeCivil ApplicationIS Code Referenceα LevelDecision Rule
Z-TestTraffic/Environmental LoadsIRC:6-20170.05Load > Design
T-TestConcrete Quality ControlIS:456-20000.05Strength < Spec
χ²-TestSoil Property VariabilityIS:27200.10CV > Limit
F-TestBatch/Material ComparisonIS:102620.05Variances unequal
Quality Control Protocol (IS:456):
M30 Concrete: Test 3 cubes at 7d, 6 at 28d
H₀: μ ≥ 30MPa vs H₁: μ < 30MPa
Reject if mean of any group < characteristic strength

🎯 Module 5: Power Analysis & Sample Size (15 mins)

📐 Sample Size Formulas

Z-Test: n = [zα/2 + zβ]²(σ/δ)²
T-Test: n ≈ [tα/2,df + tβ,df]²(σ/δ)²
Concrete Example: μ₀=30MPa, δ=1MPa, σ=2MPa, Power=0.9
n = [1.96+1.28]²(2/1)² = 39.2 → 40 samples minimum

✍️ Advanced In-Class Exercises

Exercise 1 - Structural Steel Yield Strength:
n=20, x̄=245MPa, s=8MPa, Spec=250MPa, α=0.05
Solution: t19=-2.50 > -2.093 → Acceptable
Exercise 2 - Aggregate Variance Test:
n=25, s²=16.4, σ₀²=9 (CV=30%), α=0.10
Solution: χ²24=43.11 ∈ [13.85, 36.42] → Acceptable

🧠 University-Level Assessment (10 Questions)

  1. The Neyman-Pearson lemma optimizes: a) Power for fixed α
  2. T-distribution approaches normal when: a) df → ∞
  3. χ²n-1 expected value equals: a) n-1
  4. Power = 1-β measures: a) Correct rejection probability
  5. For concrete QC, typical α = a) 0.05

🚀 Master Equation Summary

General Test Statistic: T = [Sample Stat - Hypothesized Value] / SE
Decision Rule: |T| > Critical Value or p-value < α
Engineering Action: Translate statistical decision → Design/Quality decision

#6 Hypothesis Testing

Hypothesis Testing Lecture - Civil Engineering Statistics

🧮 Hypothesis Testing Lecture Notes

Statistical Analysis for Civil Engineering Students
90-Minute Classroom Delivery | Concrete, Soil & Structural Applications

📢 Lecture Introduction

"Good morning, Class!"

Today we learn Hypothesis Testing – the statistical tool that helps civil engineers make decisions under uncertainty.

Real Civil Engineering Question: "Is this concrete batch strong enough for the bridge? Is this soil variance too high for foundation design?"

Hypothesis Testing Answer: We test if sample evidence rejects the "null hypothesis" (status quo/design specification).

🎯 Module 1: Concepts of Hypothesis Testing

1.1 What is Hypothesis Testing?

H₀: Null Hypothesis (Status Quo) = "Concrete meets 30 MPa spec"
H₁: Alternative Hypothesis = "Concrete < 30 MPa"

1.2 Types of Errors

H₀ TrueH₀ False
Accept H₀CorrectType II Error (β)
Reject H₀Type I Error (α)Correct (1-β = Power)
α = Reject good concrete (5% risk)
β = Accept bad concrete

1.3 5-Step Test Procedure

1. H₀: μ = μ₀ vs H₁: μ ≠/>/<
2. Choose test statistic (t, z, F, χ²)
3. Compute p-value or critical value
4. Decision: If p < α, Reject H₀
5. Engineering Conclusion

📊 Module 2: Tests for Means

2.1 Z-Test (Large Sample, σ known)

z = (x̄ - μ₀) / (σ/√n)
|z| > zα/2 → Reject H₀
Worked Example: 50 trucks: x̄=420kN, σ=60kN, μ₀=400kN
z = (420-400)/(60/√50) = 2.36 > 1.645
REJECT H₀: "Bridge loads exceed design"

2.2 T-Test (Small Sample)

t = (x̄ - μ₀) / (s/√n), df = n-1
Concrete Test: 8 cubes: x̄=29.625, s=1.53, μ₀=30
t = -0.693 < 1.895 → Concrete meets spec

📈 Module 3: Tests for Variance

3.1 Chi-Square Test

χ² = (n-1)s² / σ₀², df = n-1
Soil Test: 12 samples, s²=4.5, σ₀²=3.0
χ² = 16.5 (between 3.816-21.92)
FAIL TO REJECT: "Soil variability acceptable"

3.2 F-Test (Two Variances)

F = s₁²/s₂² → Compare to Fcritical

🏗️ Module 4: Civil Engineering Applications

TestSituationStatisticCivil Application
Z-testn≥30, σ knownz-scoreTraffic loads
T-testn<30 or σ unknownt-scoreConcrete strength
χ²-testSingle varianceχ²Soil variability
F-testTwo variancesF-ratioBatch comparison

🎯 Module 5: P-Values (Modern Method)

p-value = P(Type I error | H₀ true)
If p < α → Reject H₀

✍️ In-Class Exercises

Exercise 1: Concrete: x̄=28.5MPa, s=2.1, spec=30MPa
Solution: t=-2.36, p≈0.02 < 0.05 → REJECT BATCH
Exercise 2: Soil: s²=2.8, spec=2.0 → ACCEPTABLE

🧠 Classroom Quiz (5 Questions)

  1. H₀ always contains: a) Equality
  2. α=0.05 means: a) 5% Type I error risk
  3. Concrete test alternative: b) μ < 30
  4. Smaller p-value: a) Stronger evidence vs H₀

🚀 Key Takeaways

  1. Hypothesis Testing = Decision making from samples
  2. Civil Applications: Concrete ✓ Soil ✓ Loads ✓ Quality Control ✓
  3. Always state: H₀, H₁, α, Decision + Engineering Conclusion
  4. p < 0.05 → ACTION REQUIRED

#5a Moments

Civil Engineering Statistics Learning Platform

Civil Engineering Statistics Learning Platform

Moments, Hydrology Statistics & Engineering Data Analysis

Moments Calculator


---

Gumbel Flood Frequency Calculator

Flood estimation formula

$$ X_T = \bar{X} + K\sigma $$


---

Normal Distribution Visualization

---

Rainfall Frequency Analysis Tool


---

Hydrology Research Datasets

Download datasets for practice and research



---

Student Quiz

1. The first statistical moment represents:

2. Which distribution is widely used for flood frequency analysis?


Civil Engineering Statistics Learning Platform

#5 Moments

Estimation of Moments, Method of Moments and Maximum Likelihood Estimation

Statistical parameter estimation is widely used in Civil Engineering. Engineers estimate unknown parameters such as rainfall mean, soil strength distribution, traffic arrival rate, and material reliability using sample data.


Module 1: Estimation of Moments

A moment describes characteristics of a distribution such as mean and variance.

First moment about origin:

$$ \mu_1 = E(X) $$

Second moment about origin:

$$ \mu_2 = E(X^2) $$

Sample moment estimators:

$$ m_1 = \frac{1}{n}\sum x_i $$

$$ m_2 = \frac{1}{n}\sum x_i^2 $$

Worked Example 1 – Rainfall Analysis

Daily rainfall (mm): 20, 25, 30, 35

First moment:

$$ m_1 = \frac{20+25+30+35}{4} $$

$$ m_1 = 27.5 $$

Second moment:

$$ m_2 = \frac{400+625+900+1225}{4} $$

$$ m_2 = 787.5 $$

Worked Example 2 – Concrete Strength

Strength values (MPa): 28, 30, 32

$$ m_1 = \frac{28+30+32}{3} = 30 $$

$$ m_2 = \frac{784+900+1024}{3} $$

$$ m_2 = 902.67 $$

Worked Example 3 – Traffic Flow

Vehicles per minute: 10, 12, 8, 9

$$ m_1 = \frac{10+12+8+9}{4} $$

$$ m_1 = 9.75 $$

$$ m_2 = \frac{100+144+64+81}{4} $$

$$ m_2 = 97.25 $$

Worked Example 4 – Soil Density

Soil density (kN/m³): 18, 19, 20

$$ m_1 = \frac{18+19+20}{3} = 19 $$

$$ m_2 = \frac{324+361+400}{3} $$

$$ m_2 = 361.67 $$

Worked Example 5 – River Discharge

River discharge (m³/s): 150, 160, 170

$$ m_1 = \frac{150+160+170}{3} $$

$$ m_1 = 160 $$

$$ m_2 = \frac{22500+25600+28900}{3} $$

$$ m_2 = 25666.67 $$


Module 2: Method of Moments

The Method of Moments estimates parameters by equating sample moments with theoretical moments.

If population mean is:

$$ \mu = \theta $$

Set sample mean equal to theoretical mean:

$$ \bar{x} = \theta $$

Worked Example 1 – Estimating Mean Rainfall

Rainfall data: 40, 45, 50, 55

Sample moment:

$$ \bar{x} = \frac{40+45+50+55}{4} $$

$$ \bar{x} = 47.5 $$

Estimated rainfall parameter = 47.5 mm

Worked Example 2 – Soil Strength Parameter

Soil bearing capacity (kN/m²): 120, 130, 140

$$ \bar{x} = \frac{120+130+140}{3} $$

$$ \bar{x} = 130 $$

Estimated soil strength parameter = 130 kN/m²

Worked Example 3 – Traffic Arrival Rate

Vehicles per minute: 6, 7, 5, 8

$$ \bar{x} = \frac{6+7+5+8}{4} $$

$$ \bar{x} = 6.5 $$

Estimated arrival rate = 6.5 vehicles/min

Worked Example 4 – Bridge Load Distribution

Load measurements (kN): 100, 105, 110, 95

$$ \bar{x} = \frac{100+105+110+95}{4} $$

$$ \bar{x} = 102.5 $$

Estimated mean load = 102.5 kN

Worked Example 5 – Water Demand

Daily water demand (MLD): 200, 220, 210

$$ \bar{x} = \frac{200+220+210}{3} $$

$$ \bar{x} = 210 $$

Estimated demand parameter = 210 MLD


Module 3: Method of Maximum Likelihood (MLE)

The Maximum Likelihood Method estimates parameters by maximizing the likelihood function.

Likelihood function:

$$ L(\theta) = \prod f(x_i|\theta) $$

For many distributions the MLE of mean equals the sample mean.

$$ \hat{\mu}_{MLE} = \bar{x} $$

Worked Example 1 – Rainfall Mean Estimation

Rainfall data: 30, 35, 40

$$ \bar{x} = \frac{30+35+40}{3} $$

$$ \bar{x} = 35 $$

MLE estimate of mean rainfall = 35 mm

Worked Example 2 – Concrete Strength

Strength data (MPa): 25, 28, 30, 27

$$ \bar{x} = \frac{25+28+30+27}{4} $$

$$ \bar{x} = 27.5 $$

MLE estimate = 27.5 MPa

Worked Example 3 – Traffic Arrival Rate

Vehicles/minute: 4, 5, 6

$$ \bar{x} = \frac{4+5+6}{3} $$

$$ \bar{x} = 5 $$

Estimated arrival rate = 5 vehicles/min

Worked Example 4 – Soil Density

Soil density (kN/m³): 18, 19, 20, 19

$$ \bar{x} = \frac{18+19+20+19}{4} $$

$$ \bar{x} = 19 $$

MLE estimate = 19 kN/m³

Worked Example 5 – River Flow Estimation

River flow (m³/s): 100, 110, 120

$$ \bar{x} = \frac{100+110+120}{3} $$

$$ \bar{x} = 110 $$

Estimated mean river flow = 110 m³/s


Practice Questions

  1. Calculate the first moment for rainfall data: 10, 15, 20.
  2. Use Method of Moments to estimate parameter for data: 5, 7, 9.
  3. Find MLE estimate for mean of values: 12, 15, 18.
  4. Explain difference between Method of Moments and MLE.
  5. Give two civil engineering applications of parameter estimation.

#4 Estimators

Estimation of Parameters and Properties of Estimators

This tutorial explains estimation methods used in statistics. Civil engineers use estimation when analyzing rainfall, traffic flow, soil strength, or material properties.


Module 1: Estimation of Parameters (Sample Mean)

The most common estimator for population mean is the sample mean.

$$ \bar{x} = \frac{\sum x_i}{n} $$

where

  • xᵢ = observations
  • n = sample size

Worked Example 1

Concrete strength (MPa): 28, 30, 27, 29, 31

$$ \bar{x} = \frac{28+30+27+29+31}{5} $$

$$ \bar{x} = 29 $$

Estimated mean strength = 29 MPa

Worked Example 2

Rainfall (mm): 42, 45, 40, 44, 39

$$ \bar{x} = \frac{42+45+40+44+39}{5} $$

$$ \bar{x} = 42 $$

Worked Example 3

Traffic flow (veh/hr): 520, 510, 495, 505, 515

$$ \bar{x} = \frac{520+510+495+505+515}{5} $$

$$ \bar{x} = 509 $$

Worked Example 4

Soil density (kN/m³): 18, 19, 20, 18, 21

$$ \bar{x} = \frac{18+19+20+18+21}{5} $$

$$ \bar{x} = 19.2 $$

Worked Example 5

Bridge load values (kN): 100, 105, 110, 95, 90

$$ \bar{x} = \frac{100+105+110+95+90}{5} $$

$$ \bar{x} = 100 $$


Module 2: Estimators (Sample Variance)

Estimator for population variance:

$$ S^2 = \frac{\sum (x_i-\bar{x})^2}{n-1} $$

Worked Example 1

Data: 4, 6, 8

Mean

$$ \bar{x} = \frac{4+6+8}{3} = 6 $$

Variance

$$ S^2 = \frac{(4-6)^2+(6-6)^2+(8-6)^2}{2} $$

$$ S^2 = 4 $$

Worked Example 2

Data: 2, 4, 6, 8

Mean

$$ \bar{x} = 5 $$

Variance

$$ S^2 = \frac{9+1+1+9}{3} $$

$$ S^2 = 6.67 $$

Worked Example 3

Data: 10, 12, 14

Mean

$$ \bar{x} = 12 $$

Variance

$$ S^2 = \frac{4+0+4}{2} $$

$$ S^2 = 4 $$

Worked Example 4

Data: 5, 7, 9, 11

Mean

$$ \bar{x} = 8 $$

Variance

$$ S^2 = \frac{9+1+1+9}{3} $$

$$ S^2 = 6.67 $$

Worked Example 5

Data: 3, 3, 3, 3

Mean

$$ \bar{x} = 3 $$

Variance

$$ S^2 = 0 $$


Module 3: Bias of an Estimator

Bias formula:

$$ Bias(\hat{\theta}) = E(\hat{\theta}) - \theta $$

Worked Example 1

True mean = 50

Estimated mean = 50

$$ Bias = 50 - 50 = 0 $$

Worked Example 2

True mean = 60

Estimated mean = 58

$$ Bias = 58 - 60 = -2 $$

Worked Example 3

True value = 100

Estimated value = 105

$$ Bias = 105 - 100 = 5 $$

Worked Example 4

True rainfall mean = 40 mm

Estimator average = 42 mm

$$ Bias = 42 - 40 = 2 $$

Worked Example 5

True traffic flow = 500

Estimated mean = 495

$$ Bias = 495 - 500 = -5 $$


Module 4: Precision

Precision depends on estimator variance.

$$ Var(\hat{\theta}) $$

Worked Example 1

Estimator A: 50, 51, 49

Values are close → High precision

Worked Example 2

Estimator B: 40, 60, 50

Large variation → Low precision

Worked Example 3

Variance comparison

Estimator A variance = 2

Estimator B variance = 6

A is more precise.

Worked Example 4

Estimator values: 100, 101, 99, 100

Small variation → High precision

Worked Example 5

Estimator values: 80, 120, 90, 110

Large variation → Low precision


Module 5: Mean Square Error (MSE)

MSE formula:

$$ MSE(\hat{\theta}) = Var(\hat{\theta}) + [Bias(\hat{\theta})]^2 $$

Worked Example 1

Variance = 4

Bias = 0

$$ MSE = 4 $$

Worked Example 2

Variance = 2

Bias = 1

$$ MSE = 2 + 1^2 $$

$$ MSE = 3 $$

Worked Example 3

Variance = 5

Bias = 2

$$ MSE = 5 + 4 $$

$$ MSE = 9 $$

Worked Example 4

Variance = 1

Bias = 0.5

$$ MSE = 1 + 0.25 $$

$$ MSE = 1.25 $$

Worked Example 5

Variance = 3

Bias = 1

$$ MSE = 3 + 1 $$

$$ MSE = 4 $$


Practice Questions

  1. Find mean of 45, 48, 50, 52, 47.
  2. If variance = 6 and bias = 2, find MSE.
  3. Define unbiased estimator.
  4. Explain precision with example.
  5. Calculate variance for data: 2, 4, 6.

Friday, March 6, 2026

#3 Practice Test

This Practice Exam is designed to test both theoretical understanding and numerical application. It mirrors the format of a university-level Engineering Statistics paper.
You can add this as a final "Test Your Knowledge" section at the bottom of your blog or print it as a separate handout.

📝 Practice Exam: Statistics for Civil Engineers

Duration: 60 Minutes | Total Marks: 50
Topics: Normal Distribution & Chi-Square Test

Part A: Conceptual Understanding (10 Marks)

Answer in 1-2 sentences.
  1. (2 pts) In a Normal Distribution, if the Standard Deviation ($\sigma$) increases while the Mean ($\mu$) stays the same, how does the shape of the bell curve change?
  2. (2 pts) What is the "Null Hypothesis" ($H_0$) usually assumed during a Chi-Square Test for Independence?
  3. (2 pts) Explain why we use $n-1$ for Degrees of Freedom in a Goodness-of-Fit test.
  4. (2 pts) What does a Z-score of $+2.5$ tell an engineer about a material sample's strength?
  5. (2 pts) Can a Chi-Square value ($\chi^2$) ever be negative? Why or why not?

Part B: Numerical Application (30 Marks)

Q6. Quality Control - Steel Rebar (10 Marks)

The yield strength of Grade 500 steel rebars follows a Normal Distribution with a mean of 515 MPa and a standard deviation of 12 MPa.
  • (a) What is the probability that a randomly selected rebar has a strength of less than 500 MPa?
  • (b) If the project specification requires that 98% of rebars must pass, what is the minimum allowable strength value (the 2nd percentile)?

Q7. Material Sourcing - Aggregate Quality (10 Marks)

A site engineer receives 200 truckloads of aggregates from two different quarries (Quarry X and Quarry Y). He categorizes them as "High Quality," "Acceptable," or "Rejected."
  • Observed Data:
    • Quarry X: 40 High, 40 Acceptable, 20 Rejected.
    • Quarry Y: 60 High, 30 Acceptable, 10 Rejected.
  • Task: Use a Chi-Square Test ($\alpha = 0.05$) to determine if the quality of aggregates is independent of the Quarry source. (Critical Value for $df=2$ is 5.99).

Q8. Hydrology - Culvert Design (10 Marks)

Annual maximum discharge in a stream follows a Normal Distribution with $\mu = 120$ m³/s and $\sigma = 35$ m³/s.
  • (a) Calculate the probability that the discharge will exceed 200 m³/s in any given year.
  • (b) If a culvert is designed to handle 180 m³/s, how many times is it expected to fail (overflow) over a 50-year lifespan?

Part C: Engineering Judgement (10 Marks)

Q9. The Case Study

You are the Lead Engineer for a dam project. You have 5 years of rainfall data that "looks" normally distributed.
  • (a) Which test would you use to statistically prove that this rainfall data fits a Normal Distribution model before you begin your design?
  • (b) If your calculated $\chi^2$ value is 15.4 and the Critical Value is 11.07, what is your conclusion regarding the data's distribution?

🔑 Answer Key (For the Tutor)

  • Q1: The curve becomes shorter and wider (flatter).
  • Q2: That the two variables are independent (no relationship exists).
  • Q5: No, because the formula squares the differences, and counts cannot be negative.
  • Q6(a): $Z = -1.25$; $P \approx 0.1056$ (10.56%).
  • Q7: Calculated $\chi^2 = 8.33$. Since $8.33 > 5.99$, Reject $H_0$. Quality does depend on the quarry.
  • Q8(a): $Z = 2.28$; $P(Z>2.28) = 1 - 0.9887 = 0.0113$ (1.13%).
  • Q8(b): $Z = 1.71$; $P(Z>1.71) = 0.0436$. Expected failures = $0.0436 \times 50 \approx$ 2.18 times.
  • Q9: (a) Chi-Square Goodness-of-Fit Test. (b) The data does not fit a Normal Distribution (Reject $H_0$).
Would you like me to provide a Python script that can automatically grade the numerical portions of this exam for your students?

Practice Exam: Engineering Statistics

Combined Practice Exam

Normal Distribution & Chi-Square Analysis

Duration: 60 Minutes Total Marks: 50 Level: Undergraduate

Part A: Conceptual Basics

10 Marks
  1. If the standard deviation (σ) increases while the mean (μ) stays the same, describe the visual change in the curve.
  2. What is the standard "Null Hypothesis" (H₀) for a Chi-Square test for independence?
  3. True/False: A Chi-Square value can be negative. Explain.
  4. In hydrology, what does a "10-year storm" mean in terms of annual probability?

Part B: Numerical Problems

Q1. Steel Yield Strength (10 Marks)

Grade 500 rebar has μ = 515 MPa and σ = 12 MPa.
a) Calculate the probability that a rebar is below 500 MPa.
b) Determine the strength value that 98% of rebars will exceed.

Q2. Aggregate Quality Control (10 Marks)

QuarryHigh QualityAcceptableRejected
Quarry X404020
Quarry Y603010

Test if quality is independent of the source at α = 0.05 (Crit Value = 5.99).

Q3. Urban Drainage (10 Marks)

Annual discharge: μ = 120 m³/s, σ = 35 m³/s. If a culvert is designed for 180 m³/s, calculate the expected number of overflows in 50 years.

💡 Study Tip: The Decision Matrix

Unsure which formula to use? Follow this rule of thumb:

  • Use Normal (Z-Score): When you have measurements (weights, strengths, heights).
  • Use Chi-Square (χ²): When you are counting items into groups (pass/fail, red/blue, quarry A/B).

🔑 Answer Key & Marking Scheme

  • Conceptual: (1) Curve flattens/widens. (2) Variables are independent. (3) False (squared values). (4) 10% probability per year.
  • Steel Problem: Z = -1.25, Prob = 10.56%. 2nd Percentile = 490.4 MPa.
  • Quarry Problem: Calculated χ² = 8.33. Result: Reject H₀ (Quality depends on source).
  • Drainage Problem: Z = 1.71, P = 4.36%. Expected Failures = 2.18 times in 50 years.

#2 Chi-Square

Chi-Square Test in Civil Engineering

The Chi-Square (χ²) Test

Validating Engineering Models: Goodness-of-Fit and Independence

1. The Engineering Concept

While the Normal Distribution tells us what the data should look like, the Chi-Square Test checks if our real-world observations actually match that theory. It answers the question: "Is the difference between what I saw and what I expected just a random fluke, or is my model wrong?"

In Civil Engineering, we use it to verify if rainfall follows a specific distribution or if the failure rate of a material is truly independent of the supplier.

2. The Formula

χ² = Σ [ (Oᵢ - Eᵢ)² / Eᵢ ]

Oᵢ = Observed Frequency | Eᵢ = Expected Frequency
Degrees of Freedom (df): (Rows - 1) × (Cols - 1) or (n - 1)

📊 Choosing Your Tool: Normal vs. Chi-Square

In the field, you’ll have data, but which formula do you grab? Use this table to decide:

Feature Normal Distribution (Z-Test) Chi-Square Test (χ²)
Data Type Continuous (Measurements like MPa, mm, km/h) Categorical (Counts/Frequencies like Pass/Fail, Soil Type A/B)
Primary Goal To find the Probability of a specific value occurring. To check the Relationship or "Goodness of Fit."
Question Answered "What is the chance this beam fails?" "Does the supplier affect the failure rate?"
Key Parameters Mean (μ) and Std Dev (σ) Observed (O) and Expected (E) counts
Example Case Testing if a specific concrete cube hits 30MPa. Testing if 100 cubes follow a 1:2:1 strength ratio.
💡 Tutor Tip: If you are measuring "How much," use Normal. If you are counting "How many," use Chi-Square.

3. 10 Worked Engineering Examples

1. Cement Bag Weights (Goodness of Fit)

A machine is set to pack bags such that 20% are 49kg, 70% are 50kg, and 10% are 51kg. A sample of 100 bags shows 15, 75, and 10 bags respectively. Test at α = 0.05.

Expected: 20, 70, 10.
χ² = (15-20)²/20 + (75-70)²/70 + (10-10)²/10 = 1.25 + 0.357 + 0 = 1.607.
Critical value (df=2): 5.99. Result: Match is Good (Fail to reject).

2. Concrete Supplier vs. Strength (Independence)

Does the concrete strength (Pass/Fail) depend on the supplier (A vs B)?
Observed: A(40 Pass, 10 Fail), B(30 Pass, 20 Fail).

Total Pass = 70, Total Fail = 30. Total N = 100.
Exp A-Pass = (50*70)/100 = 35.
χ² = (40-35)²/35 + (10-15)²/15 + (30-35)²/35 + (20-15)²/15 = 4.76.
Crit (df=1): 3.84. Result: Strength depends on Supplier.

3. Traffic Accidents by Day

Accidents: Mon(12), Tue(8), Wed(15), Thu(10), Fri(20). Total = 65. Is it uniform?

Exp = 65/5 = 13 per day.
χ² = Σ(O-13)²/13 = (1+25+4+9+49)/13 = 6.77.
Crit (df=4): 9.49. Result: Accidents are distributed uniformly.

4. Rainfall Distribution Fit

Testing if 100 years of flood data fits a Normal Dist. Observed in 4 quartiles: 30, 22, 28, 20.

Exp = 100/4 = 25 per quartile.
χ² = (5²/25) + (-3²/25) + (3²/25) + (-5²/25) = 1+0.36+0.36+1 = 2.72.
Crit (df=3): 7.82. Result: Data fits the Normal Distribution.

5. Brick Type vs. Cracking

Fly-ash vs Clay bricks. Cracks observed: Fly-ash(5/50), Clay(15/50).

χ² = 5.55. Crit (df=1): 3.84.
Result: Brick type significantly affects cracking rate.

6. Pavement Distress Levels

Testing if Low/Med/High distress follows a 1:2:1 ratio. Observed 100 sections: 30 Low, 45 Med, 25 High.

Exp: 25, 50, 25.
χ² = (5²/25) + (-5²/50) + (0²/25) = 1 + 0.5 + 0 = 1.5.
Crit (df=2): 5.99. Result: Pavement follows the expected ratio.

7. Soil Type vs. Foundation Settlement

Does Settlement (High/Low) depend on Soil (Sandy/Clay)? Sandy: 10 High, 40 Low. Clay: 25 High, 25 Low.

Calculated χ² = 9.52. Crit (df=1): 3.84.
Result: Settlement is highly dependent on soil type.

8. Equipment Breakdown Frequency

3 Cranes. Breakdowns: C1(5), C2(12), C3(7). Is one crane worse?

Total = 24. Exp = 8.
χ² = (5-8)²/8 + (12-8)²/8 + (7-8)²/8 = 1.125 + 2.0 + 0.125 = 3.25.
Crit (df=2): 5.99. Result: No significant difference between cranes.

9. Surveying Error Source

Errors attributed to: Human(40), Instrument(30), Environment(30). Expected: 33.3% each.

Exp = 33.3. χ² = 4.44/33.3 + 11.1/33.3 + 11.1/33.3 = 2.0.
Crit (df=2): 5.99. Result: Error sources are equally likely.

10. Steel Grade vs Corrosion

Grade 1: 5 corroded/50. Grade 2: 12 corroded/50. Test for difference.

Calculated χ² = 3.42. Crit (df=1): 3.84.
Result: At 5% level, no significant difference (barely passed).

⚠️ Common Pitfalls

  • Small Sample Size: Never use Chi-Square if any "Expected" value is less than 5. Use Fisher’s Exact Test instead.
  • Using Percentages: Always use raw counts (frequencies). χ² doesn't work on percentages or means.
  • Degrees of Freedom: Students often use n instead of n-1. In a 2x2 table, df is always 1!

© 2024 Civil Stats Blog | Helping Engineers Make Data-Driven Decisions

#6a Advance Hypothesis Testing

Advanced Hypothesis Testing - Civil Engineering Statistics 🎓 Advanced Hypothesis Testing ...