EME 210
Data Analytics for Energy Systems

Overview

PrintPrint

Overview

This lesson covers "hypothesis testing", a set of methods that provide a rational framework for evaluating how different a sample is from a specific value or how different two samples are from each other. While confidence intervals address the question "How much could my sample statistic vary?", hypothesis testing answers the question "Given the potential variation in my sample statistic, is the statistic I measured significantly different than X ?", where X is some specific value. This lesson will teach you hypothesis testing using "randomization distributions", which is a methodology very similar to the bootstrapping you learned for confidence intervals. The data manipulation and visualization coding tools you've learned in previous lessons will be important here for preparing datasets for hypothesis testing and presenting the results.

This lesson starts with a general overview of hypothesis testing and how to form hypotheses, followed by an introduction to randomization distributions. Data from the 2021 Texas Power Crisis provide an example of how to prepare your data for a number of different hypothesis tests. As the lesson goes through these different kinds of hypothesis tests, pay attention to the similarities in the Python code for constructing the randomization distributions; this same structure can be adopted to test many other different statistics not covered in this lesson.

Learning Outcomes

By the end of this lesson, you should be able to:

  • write statistical hypotheses;
  • perform a hypothesis test using randomization;
  • interpret a p-value;
  • construct a hypothesis test for single proportion;
  • compare two samples with hypothesis testing;
  • explain significance level and Type I error;
  • experiment with sample size to see impact on p-value;
  • identify when data have paired observations;
  • devise a randomization strategy for paired data 

Lesson Roadmap

Lesson Roadmap
Type Assignment Location
To Read Lock, et. al. 4.1-4.5  Textbook
To Do

Complete Homework:

  • H06: Hypothesis Testing
  • H07: More Hypothesis Testing

Take Quiz 

Canvas

Canvas

Questions?

If you prefer to use email:

If you have any questions, please send a message through Canvas. We will check daily to respond. If your question is one that is relevant to the entire class, we may respond to the entire class rather than individually.

If you prefer to use the discussion forums:

If you have questions, please feel free to post them to the General Questions and Discussion forum in Canvas. While you are there, feel free to post your own responses if you, too, are able to help a classmate.