Hypothesis Testing. Coke vs. Pepsi Hypothesis: tweets reflect market share (people tweet as much as they drink) Market share: – 67% vs. 33% From tweets:

Slides:



Advertisements
Similar presentations
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Advertisements

Contingency Tables For Tests of Independence. Multinomials Over Various Categories Thus far the situation where there are multiple outcomes for the qualitative.
Lecture 3 Outline: Thurs, Sept 11 Chapters Probability model for 2-group randomized experiment Randomization test p-value Probability model for.
Clear your desk for your quiz. Unit 2 Day 8 Expected Value Average expectation per game if the game is played many times Can be used to evaluate and.
Hypothesis Testing A hypothesis is a claim or statement about a property of a population (in our case, about the mean or a proportion of the population)
1 Hypothesis Testing Chapter 8 of Howell How do we know when we can generalize our research findings? External validity must be good must have statistical.
Chapter 8: Binomial and Geometric Distributions
CHAPTER 13: Binomial Distributions
Testing Hypotheses About Proportions Chapter 20. Hypotheses Hypotheses are working models that we adopt temporarily. Our starting hypothesis is called.
Using Statistics to Analyze your Results
Random variable Distribution. 200 trials where I flipped the coin 50 times and counted heads no_of_heads in a trial.
Statistical Analysis – Chapter 4 Normal Distribution
Calculating Probabilities for Chance Experiments with Equally Likely Outcomes.
Chapter 6: Random Variables
CHAPTER 6 Random Variables
Estimation and Hypothesis Testing. The Investment Decision What would you like to know? What will be the return on my investment? Not possible PDF for.
Chapter 8 Hypothesis testing 1. ▪Along with estimation, hypothesis testing is one of the major fields of statistical inference ▪In estimation, we: –don’t.
Testing Hypotheses About Proportions
Mrs. Ramsey. Introductions Syllabus Calculators? Water Taste Test Hand out books! Section 5.1.
The Binomial Distribution Permutations: How many different pairs of two items are possible from these four letters: L, M. N, P. L,M L,N L,P M,L M,N M,P.
Chapter 8 Day 1. The Binomial Setting - Rules 1. Each observations falls under 2 categories we call success/failure (coin, having a child, cards – heart.
Vegas Baby A trip to Vegas is just a sample of a random variable (i.e. 100 card games, 100 slot plays or 100 video poker games) Which is more likely? Win.
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Chapter 9Section 7 Mathematical Expectation. Ch9.7 Mathematical Expectation To review from last Friday, we had the case of a binomial distribution given.
GrowingKnowing.com © Binomial probabilities Your choice is between success and failure You toss a coin and want it to come up tails Tails is success,
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 20 Testing Hypotheses About Proportions.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.3 Day 1 Binomial and Geometric Random.
Chi-Squared Analysis Stickrath.
Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning.
AP Statistics February Coin Flipping Example  On a scrap paper record the results of my coin flips. 2.
MATH 2400 Ch. 15 Notes.
Fitting probability models to frequency data. Review - proportions Data: discrete nominal variable with two states (“success” and “failure”) You can do.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.3 Binomial and Geometric Random Variables.
Game Theory, Part 2 Consider again the game that Sol and Tina were playing, but with a different payoff matrix: H T Tina H T Sol.
How likely is it that…..?. The Law of Large Numbers says that the more times you repeat an experiment the closer the relative frequency of an event will.
Welcome to MM570 Psychological Statistics
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 6 Random Variables 6.3 Binomial and Geometric.
Hypothesis Testing Notes. Hypothesis Testing  Is used to determine whether the difference in two groups is likely to be caused by chance  If you flip.
SUMMARY. Central limit theorem Statistical inference If we can’t conduct a census, we collect data from the sample of a population. Goal: make conclusions.
Introduction Suppose that a pharmaceutical company is concerned that the mean potency  of an antibiotic meet the minimum government potency standards.
Stat 100, Mar. 13 Read Chapter 18, Try problems 1-6,
Significance Tests Section Cookie Monster’s Starter Me like Cookies! Do you? You choose a card from my deck. If card is red, I give you coupon.
1 Chapter 4, Part 1 Basic ideas of Probability Relative Frequency, Classical Probability Compound Events, The Addition Rule Disjoint Events.
Section 10.2: Tests of Significance Hypothesis Testing Null and Alternative Hypothesis P-value Statistically Significant.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Welcome to MM207 Unit 7 Seminar Dr. Bob Hypothesis Testing and Excel 1.
SPSS Problem and slides Is this quarter fair? How could you determine this? You assume that flipping the coin a large number of times would result in.
SPSS Homework Practice The Neuroticism Measure = S = 6.24 n = 54 How many people likely have a neuroticism score between 29 and 34?
PROBABILLITY Transition Math What is Probability? Probability is a number from 0 to 1 that tells you how likely something is to happen. Probability can.
BIOL 582 Lecture Set 2 Inferential Statistics, Hypotheses, and Resampling.
Section 6.3 Day 1 Binomial Distributions. A Gaggle of Girls Let’s use simulation to find the probability that a couple who has three children has all.
Warm Up Exercise Warm Up Write down the four steps to confidence interval. 2.
Chi Square Pg 302. Why Chi - Squared ▪Biologists and other scientists use relationships they have discovered in the lab to predict events that might happen.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.3 Binomial and Geometric Random Variables.
SPSS Homework Practice The Neuroticism Measure = S = 6.24 n = 54 How many people likely have a neuroticism score between 29 and 34?
Introduction to Hypothesis Testing: The Binomial Test
CHAPTER 6 Random Variables
Binomial and Geometric Random Variables
Headings Vocabulary Important Words
Analysis based on normal distributions
Testing Hypotheses about Proportions
Section 10.2: Tests of Significance
CHAPTER 6 Random Variables
CHAPTER 6 Random Variables
Chi2 (A.K.A X2).
Headings Vocabulary Important Words
CHAPTER 6 Random Variables
CHAPTER 6 Random Variables
I.N. PAGE 23 & 25 Headings Vocabulary Important Words
Elementary statistics
Presentation transcript:

Hypothesis Testing

Coke vs. Pepsi Hypothesis: tweets reflect market share (people tweet as much as they drink) Market share: – 67% vs. 33% From tweets: – 71% vs. 29% Happened by chance? Or people tend to talk more about Coke than they drink it?

A simpler hypothesis testing Claim: I can distinguish Coke and Pepsi just by tasting. How do you verify my claim?

It's like a court judgment If you want to prove something, you have to assume the opposite, and find evidence that contradicts it. In a court, you want to prove a defendant guilty. You assume he/she is innocent.

You conducted an experiment… And have some outcome – 62 out 100 correct Assuming I cannot distinguish them, I did it just by random guessing, is the result possible? Of course possible, if I'm lucky, I can get 100 out 100. But is the result surprising?

How do we define surprising-ness? Let's play random guess game one million times. If it turns out, 4 of 1 million times someone manages to score 62 or more, then we can say you have to be very super duper lucky to do that. Actually % lucky. And we are % sure, that you can't get 62 in one game just by luck Thus I am actually be able to distinguish Coke and Pepsi to some extent.

But we can't play this game that many times… Or can we? Open Excel In cell B1, type = rand() Can you make B1 say 0 if the random number is less than 0.5 and 1 otherwise? You just flipped a coin in Excel!

Random Guessing Game in Excel Flip the coin 100 times, in the same column Find out how many heads you had in cell B101 We've just played the random guessing game one time. Can you do it 10 times?

Histogram We want to find out how many times we scored 62 or higher. It's also interesting to look at how the scores are distributed, i.e. which are more likely It's called a histogram Let's create one by hand Then in Excel

Now do it 50 times! (or more… doesn't have to be exact) Does the histogram look better? What about 500 times? Look at the histogram

How probable is a score of 62? You can calculate it from the histogram Let's play the game in Python for as many times as we want! Here are the steps: – flip a coin 100 times, and record the number of heads (I'll show you how to flip coins in Python) – Do it 1,000 times. Record all the scores (numbers of heads) – Find out how many of them is greater than 62. What's the percentage? – Now calculate this percentage for 2,000 games. 5,000 games, 10,000 and 50,000 games. What about the score 57 or higher? 54? 50? – Ahuh, may be you want to write a function…

Back to Coke vs. Pepsi