Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random Selection and Probability

Similar presentations


Presentation on theme: "Random Selection and Probability"— Presentation transcript:

1 Random Selection and Probability
Chapter 8 Random Selection and Probability

2 The Literary Digest Presidential Survey of 1936
Presidential election: Roosevelt vs. Landon Literary Digest predicted Landon would win, 57% to 43%, based on a survey of millions of people. Roosevelt won with 62% Reason: A biased sample Samples need to be random if possible. “random selection”

3 Probability: Basic Concepts
Probability values are always between 0 and 1. Will Beep Beep like a new food? p = 0 means that there is no way it will ever happen. p = 1 means that the event is 100% sure to happen.

4 Probability: General Ideas
Probability can be expressed in fractions, decimals or percents. 1/52 = = 1.92% Often stated in chances in “2 chances in 100” Note: 10 chances out of 100 is the same 1 in 10. Odds: The ratio of something happening to something not happening. Example: a 75% chance of rain. p(A) = ¾, p(not A) = ¼ Odds of A occurring = p(A) : p(not A) = ¾ : ¼ = 3 : 1

5 Probability: Definition of a priori probability
p (A) = (Number of events that are A)/(Total number of possible events) Example: Rolling a 6 with one die. Let’s call this event “6” p (6) = 1/6 = .167 Example: rolling a 5 or higher Let’s call this event “5+” p (5+) = (1 + 1)/6 = .333

6 Posteriori Probability (experience): A Dice Exercise
A posteriori probability (experience based) Roll a pair of dice 20 times to see how many 7s you get. Calculate p(7) = (A events)/(Total Events) = (#7s)/20 A priori probability (theoretical based) Calculate p (7) = (number possible ways of getting a 7)/ (total number of possible rolls) Note: there are 6 ways of getting a 7. There are 36 possible roles.

7 Exercise: A Priori Probability.
If you draw one card from a deck of cards, what is the probability that it is. . . p (the ace of diamonds) 1 ace of diamonds out of 52 cards => 1/52 p (a 10) 4/52 = 1/13 p (a queen or a heart) 4 queens + 13 hearts – 1 double (Queen of Hearts) => 16/52 = 4/13

8 Probability and Normally Distributed Continuous Variables
In an average month, Beep Beep eats 120 cookies with a standard deviation of 8 cookies. What is the probability that Beep Beep will eat 134 cookies or more in a given month? p(A)=(Area under curve corresponding to A)/ (Area under total curve) Use the z-score to find the area we’re interested in .

9 Chapter 9 The Binomial Distribution:
A Simple Way to Calculate Probability Under Specific Conditions

10 Flipping a Coin: If you think about it. . .
1. You can flip a coin a series of N times. 2. On each flip there are only two possible outcomes, Heads (H) and Tails (T). 3. On each flip, the two outcomes are mutually exclusive; You can’t get both H and T. 4. There is independence between each flip. 5. The probability of each outcome, p(H) (=P) and p(T) (=Q), stays the same on each flip. A binomial distribution is any distribution which meets these five criteria. Note it’s not necessary that P = Q = 0.5.

11 Probability Distribution of 2 Coin Flips.
Suppose we want to find the probability of getting 1 H and 1 T in any order with two coin flips. Let’s first create a table of all possible outcomes. Penny 1 Penny 2 Number of Heads T H 1 2

12 Probability distribution:. p(0 heads) = ¼ = .25 p(1 heads) = 2/4 = .5
So we can use this probability distribution table to find the probability of Getting exactly 1 heads. p = .50 Getting 1 or more heads. p = = .75 Getting something more extreme than one heads. p = = .50 Penny 1 Penny 2 Number of Heads T H 1 2

13 BINOM.DIST Function in Excel
This function has 4 arguments: BINOM.DIST (# of P events, N, P, Cumulative?) # of P events = Number of successes that interest us, e.g., # of heads N = number of trials, e.g., coin flips. P = Probability of a success (a P event), e.g. .50 for a fair coin. Cumulative ? = False => just calculate the probability of getting the specified number of events, e.g. , 3 heads out 7 flips. = True => calculate the probability of getting up to the specified number of events, e.g., 3 or fewer heads out of 7 flips.

14 BINOM.DIST Function in Excel
What is the probability of getting exactly 3 heads with 7 coin flips? Four things you need to know to use the binomial function 1) Definition the event (outcome) that interest us: P event = getting a heads randomly 2) The total number of events: N Example: 7 coin flips => N = 7 3) The total number of outcomes that interest us (# of P Events): ≤N. Example: 3 heads => # of P events = 3 4) The probability of each of these events happening: P Example: P = .50 5) Cumulative? = False. We want the probability of exactly 3 heads #

15 Calculations in Excel 1. What is the probability of getting exactly 3 heads with 7 coin flips? 2. What is the probability of getting 3 heads or fewer with 7 coin flips? 3. What is the probability of getting less than 4 heads with 7 coin flips? 4. What is the probability of getting more than 3 heads with 7 coin flips? 5. What is the probability of getting 6 or more heads with 7 coin flips?

16 Chapter 10 Hypothesis Testing
Introduction to Hypothesis testing

17 Experiment: Does Beep Beep have “Cookie Power”?

18 Marinol Example Marinol: A pill containing THC extracted from marijuana. Used to increase appetite in AIDS patients and decreases nausea in cancer patients. Doesn’t make people want to sit around and do nothing. Not addictive. Doesn’t cause lung cancer. Unclear if it causes loss of intelligence, schizophrenia, and bipolar disorder like smoking marijuana does.

19 The Marinol Study 10 people (N = 10).
Experimental condition: Marinol before a meal. Control condition: a placebo (fake pill) before a meal. Two scores are recorded for each person. Day 1: Food eaten with Marinol (in calories) Day 2: Food eaten with placebo (in calories) Hypothesis: Marinol affects appetite

20 Marinol Study Results Independent Variable (IV): Whether or not THC was consumed before the meal. Dependent variable (DV): How much they ate. N = 10

21 What test to use? The sign test
Considers only the direction (sign) of the results. Did food consumption go up or down? For 9 out of 10 people, food consumption went up (9 +s). Does that mean anything? Could it just happen by chance? If the probability of getting 9 out 10 scores to go up by chance is 1 chance in 1,000,000,000 then these results are important. If the probability is 1 chance in 3, then these results might not mean much..

22 Key Concepts in Hypothesis Testing
Alternative hypothesis Null hypothesis Alpha level Number of tails (directional or non-directional hypotheses) Type 1 and Type 2 errors

23 H1: What we suspect is true (The alternative hypothesis)
H1: A hypothesis that claims that the difference in results between conditions is due to those conditions. “Marinol affects appetite” This means. . . People who take marinol will eat different amounts than people who do not take marinol.

24 H1: What we suspect is true (The alternative hypothesis)
Can be directional or non-directional Non-directional (2 tails) “Marinol affects appetite” Directional (1 tail) “Marinol increases appetite” People who take marinol will eat more than people who do not take marinol. “Marinol decreases appetite” People who take marinol will eat less than people who do not take marinol.

25 Ho: The Null Hypothesis
The null hypothesis states that any difference between two groups is due only to chance. The opposite of H1; If H0 is false, then H1 must be true. H1: Marinol affects appetite. H0 : Marinol does not affect appetite. People who take marinol eat the same amount as those who don’t take marinol. Any difference in eating between those who do and don’t take Marinol is due to chance H1 and H0 must be mutually exclusive and exhaustive. H1: Marinol increases appetite. H0 : Marinol does not increase appetite.

26 Ho: The Null Hypothesis
If H0 is formulated in such a way to include the possibility that the only reason for a difference is chance, we can calculate the probability of getting the results we have by chance and judge if we should retain or reject Ho. (Note: This is a weird concept) “Marinol does not affect appetite.” If we conclude that it’s very, very unlikely that we got our results by chance, we can reject H0. If H0 is false, then H1 is true.

27 The Decision Rule (α level)
At what point do we decide to reject H0? If we reject H0, we say the results are significant. The cut off point is called α. We usually choose α = .05. If there’s less than a 5% chance of the results happening by chance, we reject H0 and conclude that H1 is probably true.

28 Marinol Experiment We got 9 out of 10 +’s. What is the chance of that happening randomly? (pobtained) Our H0 is : Marinol does not affect appetite. If the probability of getting 9 out of 10 +’s by chance is less than .05, we can reject the null hypothesis. We can use the binomial distribution to test H0. 10 patients, N = 10 P = probability of getting a plus with any patient by chance, P = .50 Number of P events = 9 Cumulative = False (for now) pobt =BINOM.DIST(9, 10, .5, False) = => Reject H0!

29 Evaluating the extremes (the 2 tails).
Marinol Experiment: We calculated the probability of getting 9 +’s and 1 - . It’s more correct to calculate the probability of getting any outcome at least that extreme. H1: Marinol affects appetite. This is a non-directional hypothesis. We should calculate the outcome for: 9 +’s and 1 – 10 +’s and 0 – 1 + and 9 –’s 0 + and 10 –‘s

30 Evaluating the tails. p (0, 1, 9, or 10 +’s) = p(0) + (1) + p(9) + p(10) =Binom.dist(0,10,.5,False) + Binom.dist(1,10,.5, False) Binom.dist(9,10,.5,False) + Binom.dist (10,10,.5, False) = = (Reject H0 with α = .05)

31 1- or 2-Tailed Probability Evaluations?
Our H0 was that Marinol does not affect appetite. This means we would reject H0 if appetite went up or down. This is a two-tailed (non-directional) probability evaluation. The rejection region of the normal curve includes both tails with 2.5%. If we didn’t care about appetite going down, we could just check to see if appetite went up. We wouldn’t care about the cases with 0 or 1 +’s. H1: Marinol increases appetite. This would be a 1-tailed (directional) probability evaluation. The rejection region only includes one tail with 5%.

32 Church Brochure Example
25% of the time a visitor would come to a Sunday Service when there was no outreach activity. Brochures were distributed 5 times. 4 out of 5 times, visitors came to the next service. H1 = More visitors come when brochures are distributed. H0 = The same number or fewer visitors come when brochures are distributed. What is the probability that visitors would come to at least 4 of the 5 services following distributions if the null hypothesis is true?

33 Church Brochure Example

34 Do Mistakes Ever Happen?
If we’re wrong, we need to admit it. In statistics, there’s always a chance we’re wrong. It’s best to admit it beforehand. With α = .05, there’s always a 5% chance of being wrong. If we conclude that H1 is true, and we’re wrong, it’s called a Type 1 error (seeing a relationship that’s not there). Example: If a church distributes a new brochure and 10 visitors come the next week (and there have never been 10 visitors before), we may conclude it’s because of the brochure. If it’s really because of chance, we’ve made a Type 1 error.

35 What if we’re wrong? Another type of error occurs when we
don’t reject H0 but we should have. Example: Suppose the church brochures are effective, but we just didn’t distribute enough to tell (only 2 distributions, and a visitor comes 1 Sunday). We could conclude that we can’t tell if they make a difference, whereas if we distributed more, we could see that they do. This is called a Type II error. If we concluded that we can’t tell if Marinol affects appetite, but it really did, it would be a Type II error.

36 What if we’re wrong? What type I and type II errors do we make as Christians? Type 1 error: Seeing a relationship that doesn’t really exist. Type 2 error: Missing a relationship that really exists. Do Christians make too many type I errors? We need to test the efficacy of our programs. Do Christians make too many type II errors? We need to take more risks for God. It’s too easy to say “It doesn’t work.”

37 The Alpha Level and Errors
We can choose any α we want: .10, .05, .01, .001. α defines the chance of making a Type I error. However, the lower the α, the higher the chance of making a Type II error. Example: H1: Church brochures cause people to visit a church. H0: The brochures do not cause people to visit. Suppose visitors come 4 out of 5 times after distributing brochures (pobt = .02). Do we reject the null?


Download ppt "Random Selection and Probability"

Similar presentations


Ads by Google