Class10

Class Overview

  • Class Level: 10

  • Subject: Hypothesis tests

  • Course: Introduction to Statistics for Social Sciences

  • Institution: Department of Statistics, UC3M

Chapter Overview

Topics Covered

  1. Elements of a hypothesis test

  2. Types of errors

  3. Significance level and critical region

  4. The p-value

  5. Two-sided tests and confidence intervals

  6. Tests for a proportion

Recommended Reading

  • Relation between hypothesis tests and criminal trials related content available online.

Objective

  • To formally assess if a sample supports a specific experimental hypothesis.

  • Example Scenario:

    • Hypothesis: average salary is 25000 euros.

    • Sample: 100 individuals with average salary of 22000 euros.

    • Question: Probability of observing such a sample under the hypothesis.

Definition of Hypothesis Test

  • Hypothesis: Affirmation about a population.

  • Parametric Hypothesis: Relates to values of a population parameter (e.g., population mean, μ > 0).

  • Hypothesis Test: Statistical method for determining if data supports a hypothesis.

Example Scenario

  • Observation: Concern about COVID-19 among students.

  • Sample ratings of concern now versus one year ago:

    • Data: -2, -0.4, -0.7, -2, +0.4, -2.2, +1.3, -1.2, -1.1, -2.3

    • Assessment needed: Does sample mean (x = -1.02) indicate a real decrease in concern?

Elements of a Hypothesis Test

Types of Hypotheses

  • Alternative Hypothesis (H1): Evidence for what we want to prove.

    • Example: H1: μ < 0

  • Null Hypothesis (H0): Assumed to be true until evidence suggests otherwise.

    • Example: H0: μ = 0

Testing Framework

  1. Assume H0 is true (μ = 0).

  2. Assess if observed data (x = -1.02) could occur if H0 is true.

  3. If data is unlikely under H0, evidence supports H1.

  4. Assumed population is normal with known variance.

Analysis of Sample Data

Distribution Under H0

  • X follows N(0, 1/10).

  • Determine evidence based on observed values under H0 vs H1.

  • If observed mean x = -1.02, it has a very low chance of occurrence under H0 (0.0006).

Types of Errors in Hypothesis Testing

Ho True

H1 True

Don't Reject Ho

Correct Decision

Type II Error

Reject Ho

Type I Error

Correct Decision

Significance Level and Critical Region

  • Significance Level (α): Probability of mistakenly rejecting H0 when it is true.

    • Common values: 0.1, 0.05, 0.01.

  • Critical Region: Values leading to rejection of H0.

    • Example: Reject H0 if x < -0.165.

The p-value

  • Defines the smallest α for which H0 would be rejected.

  • Interpretation: A small p-value indicates strong evidence against H0.

    • Example p-value = 0.00063; strong evidence in favor of H1.

Case Study: Political Ratings

Hypothesis Test Example

  • Leader: Yolanda Díaz

  • Hypotheses:

    • H0: μ = 5

    • H1: μ > 5

  • Data Context: n = 3600, x = 5.23, α = 0.1.

  • Conclusion: Evidence suggests true mean rating is above 5.

Two-Sided Tests and Confidence Intervals

  • Hypotheses Testing for Mean Difference:

    • Example: Testing if Pedro Sánchez's true mean is different from 5.

  • Process includes checking rejection region and using confidence intervals to validate results.

Example Calculation

  1. Sampling Data: n = 3844, x = 4.79, α = 0.05.

  2. Check if x falls in rejection region RR: { x | x < 4.92 or x > 5.08 }.

  3. Conclusion shows evidence against H0.

Tests for Proportions

Testing Proportions

  • For large samples, sample proportion follows normal distribution:

    • Mean: p

    • Variance: p(1-p)/n

Example Testing Interest in Mobility Programs

  1. Hypotheses:

    • H0: p = 0.4 (no increase)

    • H1: p > 0.4 (increase)

  2. Data: n = 100, 43 interested.

  3. p-value = 0.2701 (fails to reject H0).

  4. Conclusion: No evidence of increase above 40%.

Exercise

  • Analyze perceptions regarding consequences of the Russian invasion of Ukraine.

  • Test: Is true proportion of Spaniards who think consequences are significant different from 40% at a 5% significance level?

  • Include a confidence interval to validate the hypothesis.