Hypothesis Testing

Introduction to Statistics in Google Sheets

Ted Kwartler

Data Dude

Anatomy of hypothesis testing

"The average Ferrari price is higher than the average sports car price"

  • Hypothesis: Any testable claim
Introduction to Statistics in Google Sheets

Null Vs Alternate Testable Hypotheses

  • Null Hypothesis

    • Represents the status quo (accepted fact)
    • Represented by H0
  • Example H0: Average Ferrari Price EQUALS Average Sports Car Price

  • Alternate/Research Hypothesis

    • Challenger statement
    • Represented by H1
  • Example H1: Average Ferrari Price DOES NOT EQUAL Average Sports Car Price

Introduction to Statistics in Google Sheets

Common sense testing

Null Hypothesis (H0):

Average Ferrari Price equals Average Sports Car Price

Alternate Hypothesis (H1):

Average Ferrari Price does not equal Average Sports Car Price

  • Average Ferrari Price (Sample Size = 50) = $252,000
  • Average non-Ferrari Sports Car Price (Sample Size = 50) = $85,000
  • REJECT the Null Hypothesis (H0)
Introduction to Statistics in Google Sheets

Another common sense test

Null Hypothesis (H0):

Average Toyota Price equals Average Honda Price

Alternate Hypothesis (H1):

Average Toyota Price does not equal Average Honda Price

  • Average Toyota Price (Sample Size = 50) = $23,845
  • Average Honda Price (Sample Size = 50) = $23,720
  • FAIL TO REJECT the Null Hypothesis (H0)
Introduction to Statistics in Google Sheets

Removing subjectivity in a test

  • Hypothesis tests use "test statistics" to verify hypotheses
  • Example: t-test (In Google Sheets: T.TEST(range1, range2, tails, type))
    • Produces a "p-value"
    • p-value: Probability that the results you see are due to chance/error
    • Choose a p-value cutoff (Example: 1%/0.01, or 5%/0.05)
    • If p-value Is less than the cutoff, REJECT the Null Hypothesis
      • Conclude that there IS a difference between the samples
Introduction to Statistics in Google Sheets
  • Google Sheets Formula:
= T.TEST(range1, range2, tails, type)
  • If testing only GREATER THAN / > or LESS THAN / <:

    • The test has 1 tail
  • If the HO operator is EQUALS / =:

    • 2 tails, as the values can be above or below the mean
  • If measuring the same observations at different times:

    • Type = 1
  • If measuring different observations with same variance:

    • Type = 2
  • If measuring different observations with different variances:

    • Type = 3
Introduction to Statistics in Google Sheets

Let's practice!

Introduction to Statistics in Google Sheets

Preparing Video For Download...