Learn R: Hypothesis Testing
Learn about the statistics used to run hypothesis tests. Then, learn how to use R to run different t-tests that compare distributions.
StartKey Concepts
Review core concepts you need to learn to master this subject
Hypothesis Test Errors
Hypothesis Test Errors
Type I errors, also known as false positives, is the error of rejecting a null hypothesis when it is actually true. This can be viewed as a miss being registered as a hit. The acceptable rate of this type of error is called significance level and is usually set to be 0.05
(5%) or 0.01
(1%).
Type II errors, also known as false negatives, is the error of not rejecting a null hypothesis when the alternative hypothesis is the true. This can be viewed as a hit being registered as a miss.
Depending on the purpose of testing, testers decide which type of error to be concerned. But, usually type I
error is more important than type II
.
- 1Say you work for a major social media website. Your boss comes to you with two questions: * does the demographic of users on your site match the company’s expectation? * did the new interface updat…
- 2Suppose you want to know the average height of an oak tree in your local park. On Monday, you measure 10 trees and get an average height of 32 ft. On Tuesday, you measure 12 different trees and rea…
- 3In the previous exercise, the sample means you calculated closely approximated the population mean. This won’t always be the case! Consider a tailor of school uniforms at a school for students age…
- 4You begin the statistical hypothesis testing process by defining a hypothesis, or an assumption about your population that you want to test. A hypothesis can be written in words, but can also be …
- 5Suppose you want to know if students who study history are more interested in volleyball than students who study chemistry. Before doing anything else to answer your original question, you come up …
- 6When using automated processes to make decisions, you need to be aware of how this automation can lead to mistakes. Computer programs can be as fallible as the humans who design them. Because of th…
- 8While a hypothesis test will return a p-value indicating a level of confidence in the null hypothesis, it does not definitively claim whether you should reject the null hypothesis. To make this dec…
- 9Consider the fictional business BuyPie, which sends ingredients for pies to your household so that you can make them from scratch. Suppose that a product manager hypothesizes the average age of vis…
- 10Suppose that last week, the average amount of time spent per visitor to a website was 25 minutes. This week, the average amount of time spent per visitor to a website was 29 minutes. Did the averag…
- 11Suppose that you own a chain of stores that sell ants, called VeryAnts. There are three different locations: A, B, and C. You want to know if the average ant sales over the past year are significan…
- 13Before you use numerical hypothesis tests, you need to be sure that the following things are true: #### 1. The samples should each be normally distributed…ish Data analysts in the real world of…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory