35
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.

Week 5 lecture_math_221_nov_2012

Embed Size (px)

DESCRIPTION

Nov 2012 Week 5 Lecture for Math 221

Citation preview

Page 1: Week 5 lecture_math_221_nov_2012

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: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Preparing for the Week 5 Quiz

FactorialsCombinations/PermutationsProbabilityProbability DistributionsDiscrete/Continuous DistributionsBinomial DistributionPoisson DistributionPivot Tables

Page 3: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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 = 305(5-3)! = 5 x 2! = 5 x (2x1) = 5x2 = 105(5! – 3!) = 5(120 – 6) = 5(114) = 5704!(0!) = 24(1) = 243!/0! = 6/1 = 6

Page 4: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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.

Page 5: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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).

Page 6: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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).

Page 7: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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).

Page 8: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Combinations/Permutations (continued) Minitab

Page 9: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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).

Page 10: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Combinations/Permutations (continued) Minitab

Page 11: Week 5 lecture_math_221_nov_2012

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: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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

Page 13: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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}

Page 14: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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

Page 15: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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)

Page 16: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Probability Distributions

All Probabilities must be between 0 and 1 and 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)

Page 17: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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)

Page 18: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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

Page 19: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Probability Distributions (continued)

ExamplesGiven 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

Page 20: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Probability Distributions (continued)

Examples of Probability valuesWhich of these can be probability values?3/5 YES0.004 YES1.32 NO43% YES -0.67 NO1 YES5 NO0 YES

Page 21: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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.)

Page 22: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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.)

Page 23: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Binomial and Poisson Distributions

Know 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.

Page 24: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE 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.

Page 25: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Binomial Distribution using Minitab

Open a new Minitab ProjectSince n= 6, put 0,1,2,3,4,5,6 in column C1

(Don’t forget the zero)Go to Calc>>Probability Distributions>>BinomialChange Radial Button to “Probability”Put 6 in for number of trials and 0.2 in for event

probabilityPut “C1” in for Input ColumnClick “OK”

Page 26: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Binomial Distribution using Minitab

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: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Binomial Distribution using Minitab

Remember we had p = 0.2 and n = 6Mean?

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)

Page 28: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Binomial Distribution using Minitab

Same Example, what if you were askedP(X≥5)P(X<3)Etc.Use your probabilities (next page)

Page 29: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Binomial Distribution using Minitab

P(X≥5)

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

Page 30: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Binomial Distribution using Minitab

P(X<3)

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

Page 31: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Poisson Distribution with Minitab

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: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Poisson Distribution with Minitab

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

Poisson with mean = 5

x P( X <= x )3 0.265026

Page 33: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Pivot Tables

  Chocolate Vanilla Total

Girls 13 6 19

Boys 17 5 22

Total 30 11 41

Page 34: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Pivot Tables

  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: Week 5 lecture_math_221_nov_2012

WEEK 5 LECTURE Pivot Tables

  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