1 Lecture 5 Binomial Random Variables Many experiments are like tossing a coin a fixed number of times and recording the up-face. * The two possible outcomes.

Slides:



Advertisements
Similar presentations
Statistics.  Statistically significant– When the P-value falls below the alpha level, we say that the tests is “statistically significant” at the alpha.
Advertisements

Chapter 9 Hypothesis Testing Understandable Statistics Ninth Edition
Lecture 2: Null Hypothesis Significance Testing Continued Laura McAvinue School of Psychology Trinity College Dublin.
Chapter 8: Binomial and Geometric Distributions
CHAPTER 13: Binomial Distributions
Topic 6: Introduction to Hypothesis Testing
Statistics for the Social Sciences Psychology 340 Fall 2006 Hypothesis testing.
Statistics for the Social Sciences Psychology 340 Spring 2005 Hypothesis testing.
Statistics for the Social Sciences Psychology 340 Fall 2006 Hypothesis testing.
Lecture Slides Elementary Statistics Twelfth Edition
Chapter 9 Hypothesis Testing.
Binomial Probability Distribution.
CHAPTER 6 Random Variables
AM Recitation 2/10/11.
Hypothesis Testing. Central Limit Theorem Hypotheses and statistics are dependent upon this theorem.
Fundamentals of Hypothesis Testing: One-Sample Tests
Review of Statistical Inference Prepared by Vera Tabakova, East Carolina University ECON 4550 Econometrics Memorial University of Newfoundland.
Chapter 5 Sampling Distributions
Let’s flip a coin. Making Data-Based Decisions We’re going to flip a coin 10 times. What results do you think we will get?
Inference for a Single Population Proportion (p).
Chapter 11 Data Descriptions and Probability Distributions
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Review and Preview This chapter combines the methods of descriptive statistics presented in.
Copyright © 2012 by Nelson Education Limited. Chapter 7 Hypothesis Testing I: The One-Sample Case 7-1.
Exam 1 Median: 74 Quartiles: 68, 84 Interquartile range: 16 Mean: 74.9 Standard deviation: 12.5 z = -1: 62.4 z = -1: 87.4 z = -1z = +1 Worst Question:
Binomial Experiment A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties:
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 6 Random Variables 6.3 Binomial and Geometric.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Section 5-2 Random Variables.
Chapter 11: Inference for Distributions of Categorical Data Section 11.1 Chi-Square Goodness-of-Fit Tests.
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.
Economics 173 Business Statistics Lecture 4 Fall, 2001 Professor J. Petry
Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Overview.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics Seventh Edition By Brase and Brase Prepared by: Mistah Flynn.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Rejecting Chance – Testing Hypotheses in Research Thought Questions 1. Want to test a claim about the proportion of a population who have a certain trait.
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.
Dan Piett STAT West Virginia University Lecture 12.
Outline Lecture 6 1. Two kinds of random variables a. Discrete random variables b. Continuous random variables 2. Symmetric distributions 3. Normal distributions.
© Copyright McGraw-Hill 2004
Hypothesis Testing. Central Limit Theorem Hypotheses and statistics are dependent upon this theorem.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 7A PROBABILITY DISTRIBUTIONS FOR RANDOM VARIABLES (BINOMIAL DISTRIBUTION)
1 Binomial Random Variables Lecture 5  Many experiments are like tossing a coin a fixed number of times and recording the up-face.  The two possible.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 9 Testing a Claim 9.2 Tests About a Population.
1 Lecture 6 Outline 1. Two kinds of random variables a. Discrete random variables b. Continuous random variables 2. Symmetric distributions 3. Normal distributions.
1 Outline 1. Hypothesis Tests – Introduction 2. Technical vocabulary Null Hypothesis Alternative Hypothesis α (alpha) β (beta) 3. Hypothesis Tests – Format.
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?
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 8 th Edition Chapter 9 Hypothesis Testing: Single.
Copyright © 2009 Pearson Education, Inc t LEARNING GOAL Understand when it is appropriate to use the Student t distribution rather than the normal.
Chapter 9 Hypothesis Testing Understanding Basic Statistics Fifth Edition By Brase and Brase Prepared by Jon Booze.
AP Test Practice. A student organization at a university is interested in estimating the proportion of students in favor of showing movies biweekly instead.
Probability Distributions ( 확률분포 ) Chapter 5. 2 모든 가능한 ( 확률 ) 변수의 값에 대해 확률을 할당하는 체계 X 가 1, 2, …, 6 의 값을 가진다면 이 6 개 변수 값에 확률을 할당하는 함수 Definition.
SPSS Homework Practice The Neuroticism Measure = S = 6.24 n = 54 How many people likely have a neuroticism score between 29 and 34?
Chapter 6: Probability. Probability Probability is a method for measuring and quantifying the likelihood of obtaining a specific sample from a specific.
Inference for a Single Population Proportion (p)
9.3 Hypothesis Tests for Population Proportions
CHAPTER 6 Random Variables
Binomial and Geometric Random Variables
Hypothesis Testing: One Sample Cases
Elementary Statistics
CHAPTER 6 Random Variables
Hypothesis Testing.
Random Variables Binomial Distributions
CHAPTER 6 Random Variables
Copyright © Cengage Learning. All rights reserved.
CHAPTER 6 Random Variables
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 6 Random Variables
12/12/ A Binomial Random Variables.
Presentation transcript:

1 Lecture 5 Binomial Random Variables Many experiments are like tossing a coin a fixed number of times and recording the up-face. * The two possible outcomes are Heads and Tails. * Each outcome has an associated probability. * For a fair coin, P(Heads) = P(Tails) =.50 * X = # of Heads (or Tails) in n trials constitutes a Binomial Random Variable

2 Lecture 5 Binomial Random Variables X is binomial because there are only two possible outcomes. * In a coin toss, these outcomes are Heads, Tails. X is random because the outcome is not predictable in advance (in practice vs. in principle) X is a variable: the outcome of interest (e.g., the # of Heads in n tosses) varies from one set of n tosses to the next set of n tosses.

3 Lecture 5 Binomial Random Variables * The same logic works with experiments similar to a series of coin tosses. * Our Binomial Random Variable is the # of times an outcome of interest occurs. * Example: a sample of UWO students are asked whether they favor building a new rec center. * The BRV would be X, the number of students in favor out of n students in the sample.

4 Lecture 5 Necessary Conditions for a BRV 1. The experiment consists of n identical trials 2. There are only 2 possible outcomes, called success (S) & failure (F) (labels are arbitrary) 3. P(S) = p. P(F) = q = (1-p). P and q are constant across trials. 4. Trials are independent of each other (because p and q are constant across trials) 5. BRV X = # of successes in n trials.

5 Lecture 5 3 ways to compute a binomial probability It is often of interest to know the probability of obtaining X successes in n trials of a binomial experiment. There are 3 ways to determine that probability. 1. Table look-up 2. Binomial expansion formula 3. Normal approximation to the Binomial

6 Lecture 5 BRV – Method #1 Our preferred method of determining a binomial probability is to look it up in the Binomial Probability Table, found in Table II, Appendix A, in the text. Table II contains cumulative probabilities – that is, for any X, the table gives the probability of observing X or fewer successes in n trials.

7 Lecture 5 BRV – Method #2 Expansion Formula: P(X) = ( ) p x q (n-x) (X = 0, 1, 2, … n) p = probability of success on a single trial q = 1 – p n = number of trials observed x = # of successes on those n trials n x

8 Lecture 5 BRV – Method #2 Why use this ugly expansion formula instead of a table? * Table II applies only for values of n = 5, 6, 7, 8, 9, 10, 15, 20, 25, and for a particular set of p values. In other cases: * When n is small, use the expansion formula. * When n is large, use normal approximation.

9 Lecture 5 BRV – Method #3 When n is large and p is not too close to 0 or 1, we can use the normal approximation to the binomial probability distribution. How can you tell if the normal approximation is appropriate in a given case? Use the approximation if np > 5 and nq > 5

BRV – Method #3 Histogram Normal curve X The histogram shows the probabilities of different values of the BRV X. Because area gives probability, we can use the area under a section of the normal curve to approximate the area of some part of the histogram

11 Lecture 5 BRV – Method #3 In order to use the normal approximation, we have to be able to compute the mean and standard deviation for the BRV (in order to work out Z). μ = np(# of observations times P(Success)) σ = √npq There’s just one other issue to deal with…

BRV – Method #3 X Notice how the rectangle for 7 runs from 6.5 to 7.5. The probability of X values up to and including 7 is given by the area to the left of 7.5. That is the area we want to approximate with the normal curve in this case. Notice how the normal curve misses one top corner of the rectangle for 7 and overstates the other top corner – these two errors cancel each other.

13 Lecture 5 BRV – Example 1 Air Canada keeps telling us that arrival and departure times at Pearson International are improving. Right now, the statistics show that 60% of the Air Canada planes coming into Pearson do arrive on time. (This actually is an improvement over 10 years ago when only 42% of the Air Canada planes arrived on time at Pearson.) The problem is that when a plane arrives on time, it often has to circle the airport because there’s still a plane in its gate (a plane which didn’t leave on time). Statistics also show that 50% of the planes that arrive on time have to circle at least once, while only 35% of the planes that arrive late have to circle at least once.

14 Lecture 5 BRV – Example 1 a). Of the next 15 Air Canada planes that arrive at Pearson, what’s the probability that fewer than 5 of them arrive late? P(late) =.40 (because P(on time) =.60) P(X < 5) = P(X ≤ 4) =.217 (from Table for n = 15)

15 Lecture 5 BRV – Example 1 b) Of the next 8 Air Canada planes that arrive late at Pearson, what’s the probability that no more than 6 of them can land without having to circle at least once? P(Land │Late) =.65 P(X ≤ 6) = 1 – P(X > 6) = 1 – P(X = 7 U X = 8) = 1 – 8 (.65) 7 (.35) – 8 (.65) 8 (.35) ()()

16 Lecture 5 BRV – Example 1 P (X ≤ 6) = =.8308 c) Of the next 80 Air Canada planes that arrive at Pearson, what’s the probability that between 40 and 45 (inclusive) have to circle at least once?

17 Lecture 5 BRV – Example 1 First, we check to see whether we can use the normal approximation. To do this, we need to know the probability that a plane has to circle at least once: P(C) = P(C ∩ Late) + P(C ∩ Not Late) = P(L) * P(C │L) + P(L) * P(C│L) =.35 (.40) +.6 (.5) =.44

18 Lecture 5 BRV – Example 1 Now we can do the check: n = 80. p =.44 and q = (1 – p) =.56 np = 80 (.44) = 35.2 > 5 nq = 80 (.56) = 44.8 > 5 Thus, it’s OK to use the normal approximation.

19 Lecture 5 BRV – Example 1 μ = np = 80 (.44) = 35.2 σ = √npq = √80(.44)(.56) = 4.44 Correction for continuity: to get area for 40 and up, we use X = To get area for 45 and below, we use X = 45.5

20 Lecture and up starts at and below starts at 45.5

21 Lecture 5 BRV – Example 1 Z 39.5 = 39.5 – 35.2= Z 45.5 = 45.5 – 35.2= P(.97 ≤ Z ≤ 2.32) = = That is the probability that between 40 and 45 (inclusive) of the next 80 planes have to circle at least once.

22 Lecture From here down = =.8340 From here down = =.9894

23 Lecture Using the normal approximation, we estimate the area of these rectangles to be.1558

24 Lecture 5 Introduction to Hypothesis Testing As scientists, we often want to make inferences from what is true of a sample to what is true of the population it came from. Logic of this approach: 1. Make a hypothesis (“X”) about a population 2. Say, if “X” (the hypothesis) is true in the population, then something very much like “X” should be true in the sample

25 Lecture 5 Introduction to Hypothesis Testing Logic of this approach (continued): 3. Measure the sample and find out if “X” is true in the sample. This gives you a FACT. 4. Make a decision as to whether “X” is true in the population. This is a CONCLUSION. * Note the distinction between FACT and CONCLUSION.

26 Lecture 5 Hypothesis Testing Example A bag contains 100 marbles. Each marble is either red or blue. One of two conditions exists with respect to the numbers of red and blue marbles. H O : There are equal numbers of red & blue marbles H A : 60% of the marbles are blue.

27 Lecture 5 Hypothesis Testing Example H O : There are equal numbers of red & blue marbles We call this hypothesis the Null Hypothesis. H O is the hypothesis of no effect, no difference.  In this example, no difference in # of red vs. # of blue marbles in the bag.  Real-life application: we administer a new therapy to patient group A and a placebo to group B. H O says that the two groups are not different in the severity of their disorder afterwards – that is, the therapy has no effect.

28 Lecture 5 Hypothesis Testing Example H A : 60% of the marbles are blue. H A – the Alternative Hypothesis – says that there is a difference (in this case, the difference is specified) * In this example, a difference between the # of red and the # of blue marbles in the bag. * Real-life application: H A predicts a difference in disorder severity between group that got new therapy and group that got placebo.

29 Lecture 5 Hypothesis Testing Example Which hypothesis is true (H O or H A )? You do an experiment: * you randomly select 10 marbles one at a time, with replacement, and record X = the # of blue marbles. You have a decision rule: * You decide that if 7 or more of the 10 marbles are blue, you will conclude that H A is true.

30 Lecture 5 Hypothesis Testing Example Again, note this decision rule: *You decide that if 7 or more of the 10 marbles are blue, you will conclude that H A is true. * That is, if X ≥ 7, you conclude that H A is true. * Our conclusion depends upon a number (an observation).

31 Lecture 5 Hypothesis Testing Example a. Suppose that H O is true. What is the probability that you WRONGLY conclude that H A is true? H O : P(Blue) =.5 H A : P(Blue) >.5 What is P(X ≥ 7 │P(Blue) =.5)? (What is X?) We call that value α (“Alpha”) – the probability of falsely rejecting H O.

32 Lecture 5 Hypothesis Testing Example Notice what we’re doing here. Suppose that – unbeknownst to us – H O is true. We take 10 marbles out of the bag. Even though red and blue marbles are equal in number, we might by bad luck get more blue ones than red ones. We might even get 7 or more blue ones. What is the probability that we do that?

33 Lecture 5 Hypothesis Testing Example P ( X ≥ 7 │P(Blue)=.5 ) = 1 – P(X ≤ 6) = (from Table) =.172

34 Lecture 5 Hypothesis Testing Example b. If, in fact, H A is true, what is the probability that you WRONGLY conclude that H O is true? * This value is called β (“Beta”) * β is the probability that you fail to reject H O when you should in fact reject it. * You will reject H O if fewer than 7 of the 10 marbles taken from the bag are blue. P ( X ≤ 6 │P(Blue)=.6 )=.618 (from Table) Why is p =.6 here?

35 Lecture 5 BRV – Example 3 Records for the last 5 years at UWO show that only 20% of students taking an Honors degree in Psychology fail to get a full time job within 6 months of graduating. a) I send out a survey to 4 randomly selected Honors Psychology graduates from last year. What is the probability that all are employed full time? b) In a random sample of 15 previous graduates, what is the probability that more than 5 are not employed full time?

36 Lecture 5 BRV – Example 3 a. n and x are small, so use Expansion Formula n = 4 and x = 4, so: 4! (.8) 4 (2) 0 = ! 0!

37 Lecture 5 BRV – Example 3 b. Here, n = 15, and the question is, what is the probability that X > 5? P(X > 5) = P(X ≥ 6) = 1- P(X ≤ 5) We’re told that p =.20 We remember that Table II gives cumulative probabilities, so… P(X > 5)= (from Table II) =.061

38 Lecture 5 BRV – Example 4 There’s a new game in Las Vegas in which a customer is handed a fair coin and allowed to flip it 25 times. If she gets 15 or more heads, she wins. You are hired by the Las Vegas Police to check out this game. You watch the game in the morning. Only 8 people played, and they all lost. What is the probability that this happened by chance?

39 Lecture 5 BRV – Example 4 In answering this question, keep in mind the following distinctions: A. 1 flip of the coin B. 1 play of the game (= 1 experiment) C. How you win when you play this game

40 Lecture 5 One flip of the coin 25 flips = 1 play (1 trial of the experiment) 8 people play the game once each

41 Lecture 5 BRV – Example 4 To answer this question, we need: 1. The probability of getting heads when you flip the coin once. 2. The probability of one person getting 14 or fewer heads when they flip the coin 25 times (and thus losing). 3. The probability that 8 out of 8 people get 14 or fewer heads when they each flip the coin 25 times.

42 Lecture 5 BRV – Example 4 1. P(Heads) on any flip =.5 (if coin is fair). 2. With 25 flips, from Table II, P(X ≤ 14) = P(losing game) =.788 * Therefore, P(losing) for any one person is.788

43 Lecture 5 What is p that 8 out of 8 players lose? What is the probability that 8 out of 8 customers lose? (We define “success” as losing here.) P(X = 8) = ( ) ( ) ( ) =.1487 So, you might be suspicious that the game is fixed – because it’s very unlikely that 8 out of 8 players would lose. (Not impossible, but unlikely). 8 8

44 Lecture 5 P(Heads) =.5 P(losing) =.788 P(8 out 8 people lose) =.1487