36
Week 5 Lecture Statistics for Decision Making B. Heard These charts are not to be posted or used without my written permission. Students can download a copy for their personal use.

Week52011

Embed Size (px)

DESCRIPTION

Week 5 Lecture, Statistics for Decision Making

Citation preview

Page 1: Week52011

Week 5 Lecture Statistics for Decision

MakingB. Heard

These charts are not to be posted or used without my written permission. Students can download a copy for their personal use.

Page 2: Week52011

Preparing for the Week 5 Quiz◦ Factorials◦ Combinations/Permutations◦ Probability◦ Probability Distributions◦ Discrete/Continuous Distributions◦ Binomial Distribution◦ Poisson Distribution◦ Pivot Tables

Week 5 Lecture

Page 3: Week52011

Factorials◦ n! simply means n x (n-1) x (n-2) x …. 3 x 2 x 1

For example 5! = 5x4x3x2x1 = 120, so 5!=120 Always remember that 0! = 1 (NOT ZERO) Additional examples

3! + 4! = (3x2x1) + (4x3x2x1) = 6 + 24 = 30 5(5-3)! = 5 x 2! = 5 x (2x1) = 5x2 = 10 5(5! – 3!) = 5(120 – 6) = 5(114) = 570 4!(0!) = 24(1) = 24 3!/0! = 6/1 = 6

Week 5 Lecture

Page 4: Week52011

Combinations/Permutations◦ Combinations – The number of ways of something

happening when order DOES NOT matter.

◦ Permutations – The number of ways of something happening when order DOES matter.

◦ The number of ways to pick 5 out of 10 players to start on a basketball team would be a combination.

◦ The number of ways to pick 5 out of 10 players to play 5 different positions would be a permutation.

Week 5 Lecture

Page 5: Week52011

Combinations/Permutations (continued)◦ The number of ways to pick 3 committee members

out of 11 people would be a combination because there are not distinct positions mentioned (order doesn’t matter).

◦ The number of ways to pick 3 committee members out of 11 people where 1 would be the President, Vice-President and Treasurer would be a permutation because there are distinct positions mentioned (order does matter, you not only could be picked, but you could be one of three different positions).

Week 5 Lecture

Page 6: Week52011

Combinations/Permutations (continued) Let’s Do these in Minitab

◦ The number of ways to pick 3 committee members out of 11 people would be a combination because there are not distinct positions mentioned (order doesn’t matter). This is a combination where we are picking 3 from 11 (Sometimes noted

11C3).

◦ The number of ways to pick 3 committee members out of 11 people where 1 would be the President, Vice-President and Treasurer would be a permutation because there are distinct positions mentioned (order does matter, you not only could be picked, but you could be one of three different positions). This is a permutation where we are picking 3 from 11 (Sometimes noted

11P3).

Week 5 Lecture

Page 7: Week52011

Combinations/Permutations (continued) Minitab

◦ Let’s look at the combination where we are picking 3 from 11 (Sometimes noted 11C3).

In Minitab, Choose “Calc”, then “Calculator” Type C1, or any other blank column in the “Store result in variable” box In the Expression box, type “Combinations(11,3)”

In the cell you chose, you will see your answer of 165 This means there are 165 ways to pick a committee of 3

from 11 people (remember order didn’t matter).

Week 5 Lecture

Page 8: Week52011

Combinations/Permutations (continued) Minitab

Week 5 Lecture

Page 9: Week52011

Combinations/Permutations (continued) Minitab

◦ Let’s look at the permutation where we are picking 3 from 11 (Sometimes noted 11P3).

In Minitab, Choose “Calc”, then “Calculator” Type C1, or any other blank column in the “Store result in variable” box In the Expression box, type “Permutations(11,3)”

In the cell you chose, you will see your answer of 990 This means there are 990 ways to pick a committee of 3

from 11 people where there are THREE DISTINCT POSITIONS (order DID matter).

Week 5 Lecture

Page 10: Week52011

Combinations/Permutations (continued) Minitab

Week 5 Lecture

Page 11: Week52011

Week 5 Lecture Combinations/Permutations (continued)

For the same numbers, the number of permutations will always be larger! This is because there are distinct positions.

As an example3C3 = 1 (there is only one way to pick three from three)3P3 = 6 (there are 6 ways to pick 3 people from 3 to serve in 3

distinct positions, think about it 3 could be President, 2 are left to serve as Vice-President, one is left to serve as Treasurer, 3x2x1 = 6

In our previous example we had 11P3 = 990 which could be looked at as 11 x 10 x 9 = 990. Why? 11 could be Pres., 10 VP, and 9 Treasurer.

Page 12: Week52011

Probability◦ Probability is simply the number of desired events

over the total number of events that can happen. Sound complicated? It’s not What is the probability of rolling a 5 on six-sided die? One side with a five/six sides = 1/6

Week 5 Lecture

Page 13: Week52011

Probability (continued)◦ Sample Spaces (What can happen?)

For a regular light switch, the sample space would be {on, off}

For a six-sided die, the sample space would be {1,2,3,4,5,6}

For a new baby, the sample space would be {girl, boy}

For suits in a card deck, the sample space would be {hearts, diamonds, clubs, spades}

Week 5 Lecture

Page 14: Week52011

Probability (continued)◦ Examples

What is the probability of drawing a Jack from a standard deck of cards? (There are 4 cards out of the 52 that are Jacks) The probability would be 4/52 or 1/13 simplified

What is the probability of drawing a red Jack from a standard deck of cards? (There are 2 cards out of the 52 that are red Jacks) The probability would be 2/52 or 1/26 simplified

What is the probability of drawing a Jack of Hearts from a standard deck of cards? (There is only 1 Jack of Hearts out of the 52) The probability would be 1/52

Week 5 Lecture

Page 15: Week52011

Probability (continued)◦ Conditional Probability Examples

What is the probability of drawing a Jack from a standard deck of cards, if you first drew a 3 of clubs and didn’t replace it? (There are 4 cards out of the 51 that are Jacks) The probability would be 4/51 (Remember you didn’t replace the 3 of clubs)

What is the probability of drawing a Jack from a standard deck of cards, if you first drew a Jack of clubs and didn’t replace it? (There are 3 Jacks left out of the 51) The probability would be 3/51 or 1/17 simplified (Remember you didn’t replace the Jack of clubs)

Week 5 Lecture

Page 16: Week52011

Probability Distributions◦ All Probabilities must be between 0 and 1and the

sum of the probabilities must be equal to 1.

◦ Examples◦ If X = {5, 10, 15, 20} and P(5) = 0.10, P(10) =

0.20, P(15) = 0.30, and P(20) = 0.40, can the distribution of the random variable X be considered a probability distribution? YES, because all probabilities (0.10,0.20,0.30,0.40)

are between 0 and 1 and they add up to 1 (0.10+0.20+0.30+0.40 = 1)

Week 5 Lecture

Page 17: Week52011

Probability Distributions (continued)◦ Examples◦ If X = {5, 10, 15, 20} and P(5) = 0.20, P(10) =

0.20, P(15) = 0.20, and P(20) = 0.20, can the distribution of the random variable X be considered a probability distribution? No, the probabilities (0.20,0.20,0.20,0.20) are

between 0 and 1 BUT they DO NOT add up to 1 (0.20+0.20+0.20+0.20 = 0.80)

Week 5 Lecture

Page 18: Week52011

Probability Distributions (continued)◦ Examples◦ If X = {-5, A, 7, 0} and P(-5) = 0.50, P(A) = 0.10,

P(7) = 0.10, and P(0) = 0.30, can the distribution of the random variable X be considered a probability distribution? YES, the probabilities (0.50,0.10,0.10,0.30) are

between 0 and 1 and they add up to 1 (0.50+0.10+0.10+0.30 = 1)

{-5, A, 7, 0} Does Not matter, you can have negative numbers, letters, colors, names, etc. in the sample space but you couldn’t have negative values as PROBABILITIES

Week 5 Lecture

Page 19: Week52011

Probability Distributions (continued)◦ Examples◦ Given the random variable X = {100, 200} with

P(100) = 0.7 and P(200) = 0.3. Find E(X).

◦ Simple

◦ E(X) = Sum of X(P(X) (add the values times their probabilities)

◦ E(X) = 100(0.7) + 200(0.3) = 70 + 60 = 130

Week 5 Lecture

Page 20: Week52011

Probability Distributions (continued)◦ Examples of Probability values◦ Which of these can be probability values?◦ 3/5 YES◦ 0.004 YES◦ 1.32 NO◦ 43% YES◦ -0.67 NO◦ 1 YES◦ 5 NO◦ 0 YES

Week 5 Lecture

Page 21: Week52011

Discrete/Continuous Distributions Simple explanation A discrete probability distribution has a finite

number of possible outcomes. (People, items, distinct things that can not be measured infinitesimally)

A continuous probability is based on a continuous random variable such as a persons height or weight. (GOOD EXAMPLES ARE UNITS OF MEASURE LIKE HEIGHTS, WEIGHTS, VOLUME, ETC.)

Week 5 Lecture

Page 22: Week52011

Discrete/Continuous Distributions Simple Example

◦ The number of cans of soda in your refrigerator is discrete (0,1,2,3 etc.)

◦ The amount of soda IN the can is continuous (ounces can be split and split and split, etc.)

Week 5 Lecture

Page 23: Week52011

Binomial and Poisson DistributionsKnow the difference between the two!

A good hint is that a Poisson usually give you an average number of something per time period and a Binomial gives you a probability and a number of times/trials/etc.

Week 5 Lecture

Page 24: Week52011

Binomial Distribution using Minitab

The way is to show you an example.

Let’s say we have a binomial experiment with p = 0.2 and n = 6 and you are asked to set up the distribution and show all x values and the mean, variance and standard deviation.

Week 5 Lecture

Page 25: Week52011

Binomial Distribution using Minitab ◦ Open a new Minitab Project◦ Since n= 6, put 0,1,2,3,4,5,6 in column C1 (Don’t

forget the zero)◦ Go to Calc>>Probability Distributions>>Binomial◦ Change Radial Button to “Probability”◦ Put 6 in for number of trials and 0.2 in for event

probability◦ Put “C1” in for Input Column◦ Click “OK”

Week 5 Lecture

Page 26: Week52011

Binomial Distribution using Minitab

Week 5 Lecture

You would writeX = {0,1,2,3,4,5,6}P(x=0) = 0.2621

P(x=1) = 0.3932

P(x=2) = 0.2458

P(x=3) = 0.0819

P(x=4) = 0.0154

P(x=5) = 0.0015

P(x=6) = 0.0001

This is your distribution, we now have to calculate the mean, variance and standard deviation.

Etc.

Page 27: Week52011

Binomial Distribution using Minitab ◦ Remember we had p = 0.2 and n = 6◦ Mean?

E(X) = np so E(X) = 6(0.2) = 1.2 (the mean) Why “E(X)”? Because we would “expect” the outcome

1.2 times out of the 6 times we did it.◦ Variance?

V(X) = npq (q is just “1-p”), so V(X) = 6(0.2)(1-0.2) = 6(0.2)(0.8) = 0.96 (the variance)

◦ Standard Deviation? Std Dev. = Square Root of the Variance = √0.96 =

0.9216 (the standard deviation)

Week 5 Lecture

Page 28: Week52011

Binomial Distribution using Minitab◦ Same Example, what if you were asked◦ P(X≥5)◦ P(X<3)◦ Etc.◦ Use your probabilities (next page)

Week 5 Lecture

Page 29: Week52011

Binomial Distribution using Minitab◦ P(X≥5)

Week 5 Lecture

P(X≥5) = P(X=5) + P(X=6) = 0.001536 + 0.000064 = 0.0016

Page 30: Week52011

Binomial Distribution using Minitab◦ P(X<3)

Week 5 Lecture

P(X<3) = P(X=0) + P(X=1) + P(X=2) = 0.262144 + 0.393216 = 0.245760 = 0.90112

Page 31: Week52011

Poisson Distribution with Minitab

Week 5 Lecture

Probability Density Function

Poisson with mean = 5

x P( X = x )3 0.140374

Poisson Distribution using Minitab Go to Calc>>Probability Distributions>>PoissonChange Radial Button to “Probability”Put 5 in for number of trials and 3 in for “Input Constant”Click “OK”

Find P(x=3)For a Poisson Distribution with mean = 5

Page 32: Week52011

Poisson Distribution with Minitab

Week 5 Lecture

What is the probability that X≤3? Use Cumulative Distribution Function

Poisson with mean = 5

x P( X <= x )3 0.265026

Page 33: Week52011

Pivot Tables

Week 5 Lecture

  Chocolate Vanilla Total

Girls 13 6 19

Boys 17 5 22

Total 30 11 41

Page 34: Week52011

Pivot Tables

Week 5 Lecture

  Chocolate Vanilla Total

Girls 13 6 19

Boys 17 5 22

Total 30 11 41

Find P(Girl)P(Girl) = 19/41

Find P(Vanilla)P(Vanilla) = 11/41

Find P(Girl who likes Chocolate)

13 out of the 41 so it is 13/41

Page 35: Week52011

Pivot Tables

Week 5 Lecture

  Chocolate Vanilla Total

Girls 13 6 19

Boys 17 5 22

Total 30 11 41

Find P(Girl given they like chocolate)P(Girl|Choc) = 13/30

Find P(Like Vanilla given they are a boy)P(Vanilla|Boy) = 5/22

Page 36: Week52011

Come see me and download the charts at www.facebook.com/statcave

You don’t have to be a Facebook person….

Week 5 Lecture