modeling discrete variables lecture 22, part 1 sections 6.4 fri, oct 13, 2006

27
Modeling Modeling Discrete Discrete Variables Variables Lecture 22, Part 1 Lecture 22, Part 1 Sections 6.4 Sections 6.4 Fri, Oct 13, 2006 Fri, Oct 13, 2006

Upload: betty-cannon

Post on 18-Jan-2016

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Modeling Modeling Discrete Discrete VariablesVariablesLecture 22, Part 1Lecture 22, Part 1

Sections 6.4Sections 6.4

Fri, Oct 13, 2006Fri, Oct 13, 2006

Page 2: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Two Types of VariableTwo Types of Variable

Discrete variableDiscrete variable – A variable whose – A variable whose set of possible values is a set of set of possible values is a set of isolated points on the number line.isolated points on the number line.

Continuous variableContinuous variable – A variable – A variable whose set of possible values is a whose set of possible values is a continuous interval of real numbers.continuous interval of real numbers.

Page 3: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete VariableVariable

Suppose that 10% of all households Suppose that 10% of all households have no children, 30% have one have no children, 30% have one child, 40% have two children, and child, 40% have two children, and 20% have three children.20% have three children.

Select a household at random and Select a household at random and let let XX = number of children. = number of children.

What is the distribution of What is the distribution of XX??

Page 4: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete VariableVariable

Method 1: A list.Method 1: A list. We may list each value and its We may list each value and its

proportion.proportion. XX = 0 for 0.10 of the population. = 0 for 0.10 of the population. XX = 1 for 0.30 of the population. = 1 for 0.30 of the population. XX = 2 for 0.40 of the population. = 2 for 0.40 of the population. XX = 3 for 0.20 of the population. = 3 for 0.20 of the population.

Page 5: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete VariableVariable

Method 2: A table.Method 2: A table. We may present the information as We may present the information as

a table.a table.Value ofValue of

XXProportioProportio

nn

00 0.100.10

11 0.300.30

22 0.400.40

33 0.200.20

Page 6: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Graphing a Discrete Graphing a Discrete VariableVariable

Method 3: A stick graph.Method 3: A stick graph. We may present the information as We may present the information as

a a stick graphstick graph..

x

Proportion

0 1 2 3

0.10

0.20

0.30

0.40

Page 7: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Graphing a Discrete Graphing a Discrete VariableVariable

Method 4: A histogram.Method 4: A histogram. We may present the information as We may present the information as

a histogram.a histogram.

x

Proportion

0 1 2 3

0.10

0.20

0.30

0.40

Page 8: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Discrete Random Discrete Random VariablesVariablesLecture 22, Part 2Lecture 22, Part 2

Section 7.5.1Section 7.5.1

Fri, Oct 13, 2006Fri, Oct 13, 2006

Page 9: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Random VariablesRandom Variables

Random variableRandom variable – A variable whose – A variable whose value is determined by the outcome value is determined by the outcome of a procedure where the outcome of of a procedure where the outcome of at least one step in the procedure is at least one step in the procedure is left to chance.left to chance.

Therefore, the random variable may Therefore, the random variable may take on a new value each time the take on a new value each time the procedure is performed, even though procedure is performed, even though the procedure is exactly the same.the procedure is exactly the same.

Page 10: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Random VariablesRandom Variables

A random variable is really the same A random variable is really the same thing as the variables we studied in thing as the variables we studied in Chapter 2 (page 85).Chapter 2 (page 85).

A variable is a quantitative or A variable is a quantitative or qualitative characteristic that can be qualitative characteristic that can be observed or measured for each observed or measured for each member of a population.member of a population.

So what makes it random?So what makes it random?

Page 11: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Examples of Random Examples of Random VariablesVariables

Select one person at random from a Select one person at random from a group of 10 men and 20 women.group of 10 men and 20 women.

Let Let XX be the sex of the person be the sex of the person selected.selected.

What are the possible values of What are the possible values of XX?? What are the probabilities of those What are the probabilities of those

values?values? Which step of the procedure is left to Which step of the procedure is left to

chance?chance?

Page 12: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Examples of Random Examples of Random VariablesVariables

Roll two dice. Roll two dice. Let Let XX be the number of sixes that be the number of sixes that

turn up.turn up. What is the characteristic that is What is the characteristic that is

being observed?being observed? What are the possible values of What are the possible values of XX?? What are the probabilities of those What are the probabilities of those

values?values?

Page 13: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Examples of Random Examples of Random VariablesVariables

Roll two dice. Roll two dice. Let Let XX be the total of the two be the total of the two

numbers. What is the characteristic numbers. What is the characteristic that is being observed?that is being observed?

What are the possible values of What are the possible values of XX?? What are their probabilities?What are their probabilities?

Page 14: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Examples of Random Examples of Random VariablesVariables

A bus arrives at a bus stop every 15 A bus arrives at a bus stop every 15 minutes. You show up at a random minutes. You show up at a random time. time.

Let Let XX be the time you wait until the be the time you wait until the bus arrives.bus arrives.

What are the possible values of What are the possible values of XX?? What are their probabilities?What are their probabilities?

Page 15: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

A Note About ProbabilityA Note About Probability

The The probabilityprobability that something that something happens is the happens is the proportionproportion of the time of the time that it does happen out of all the that it does happen out of all the times that it was given an times that it was given an opportunity to happen.opportunity to happen.

Therefore, “probability” and Therefore, “probability” and “proportion” are synonymous in the “proportion” are synonymous in the context of what we are doing.context of what we are doing.

Page 16: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Discrete Probability Discrete Probability Distribution FunctionsDistribution Functions

Discrete Probability Distribution Discrete Probability Distribution Function (pdf)Function (pdf) – A function that – A function that assigns a probability to each assigns a probability to each possible value of a discrete random possible value of a discrete random variable.variable.

Page 17: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Rolling Two DiceRolling Two Dice

Roll two dice and let Roll two dice and let XX be the be the number of sixes.number of sixes.

Draw the 6 Draw the 6 6 rectangle showing 6 rectangle showing all 36 possibilities.all 36 possibilities.

From it we see thatFrom it we see that PP((XX = 0) = 25/36. = 0) = 25/36. PP((XX = 1) = 10/36. = 1) = 10/36. PP((XX = 2) = 1/36. = 2) = 1/36.

(1, 1)

(1, 2)

(1, 3)

(1, 4)

(1, 5)

(1, 6)

(2, 1)

(2, 2)

(2, 3)

(2, 4)

(2, 5)

(2, 6)

(3, 1)

(3, 2)

(3, 3)

(3, 4)

(3, 5)

(3, 6)

(4, 1)

(4, 2)

(4, 3)

(4, 4)

(4, 5)

(4, 6)

(5, 1)

(5, 2)

(5, 3)

(5, 4)

(5, 5)

(5, 6)

(6, 1)

(6, 2)

(6, 3)

(6, 4)

(6, 5)

(6, 6)

Page 18: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Rolling Two DiceRolling Two Dice

We can summarize this as a list We can summarize this as a list (Method 1):(Method 1): PP((XX = 0) = 25/36. = 0) = 25/36. PP((XX = 1) = 10/36. = 1) = 10/36. PP((XX = 2) = 1/36. = 2) = 1/36.

Page 19: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Rolling Two DiceRolling Two Dice

We can summarize this in a table We can summarize this in a table (Method 2):(Method 2):

XX PP((XX = = xx))

00 25/3625/36

11 10/3610/36

22 1/361/36

Page 20: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete PDFPDF

We may present it as a stick graph We may present it as a stick graph (Method 3):(Method 3):

x

P(X = x)

0 1 2

5/36

15/36

25/36

30/36

20/36

10/36

Page 21: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete PDFPDF

We may present it as a histogram We may present it as a histogram (Method 4):(Method 4):

x

P(X = x)

0 1 2

5/36

15/36

25/36

30/36

20/36

10/36

Page 22: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Rolling Two DiceRolling Two Dice

Roll two dice and let Roll two dice and let XX be the sum of be the sum of the two numbers.the two numbers.

From it we see thatFrom it we see that PP((XX = 2) = 1/36. = 2) = 1/36. PP((XX = 3) = 2/36. = 3) = 2/36. PP((XX = 4) = 3/36. = 4) = 3/36. PP((XX = 5) = 4/36. = 5) = 4/36. PP((XX = 6) = 5/36. = 6) = 5/36. etc.etc.

(1, 1)

(1, 2)

(1, 3)

(1, 4)

(1, 5)

(1, 6)

(2, 1)

(2, 2)

(2, 3)

(2, 4)

(2, 5)

(2, 6)

(3, 1)

(3, 2)

(3, 3)

(3, 4)

(3, 5)

(3, 6)

(4, 1)

(4, 2)

(4, 3)

(4, 4)

(4, 5)

(4, 6)

(5, 1)

(5, 2)

(5, 3)

(5, 4)

(5, 5)

(5, 6)

(6, 1)

(6, 2)

(6, 3)

(6, 4)

(6, 5)

(6, 6)

Page 23: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete PDFPDF

Suppose that 10% of all households Suppose that 10% of all households have no children, 30% have one have no children, 30% have one child, 40% have two children, and child, 40% have two children, and 20% have three children.20% have three children.

Select a household at random and Select a household at random and let let XX = number of children. = number of children.

Then Then XX is a random variable. is a random variable. What is the pdf of What is the pdf of XX??

Page 24: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete PDFPDF

We may present the pdf as a list.We may present the pdf as a list. PP((XX = 0) = 0.10. = 0) = 0.10. PP((XX = 1) = 0.30. = 1) = 0.30. PP((XX = 2) = 0.40. = 2) = 0.40. PP((XX = 3) = 0.20. = 3) = 0.20.

Page 25: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete PDFPDF

We may present the pdf as a table.We may present the pdf as a table.

xx PP((XX = = xx))

00 0.100.10

11 0.300.30

22 0.400.40

33 0.200.20

Page 26: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete PDFPDF

Or we may present it as a stick Or we may present it as a stick graph.graph.

x

P(X = x)

0 1 2 3

0.10

0.20

0.30

0.40

Page 27: Modeling Discrete Variables Lecture 22, Part 1 Sections 6.4 Fri, Oct 13, 2006

Example of a Discrete Example of a Discrete PDFPDF

Or we may present it as a Or we may present it as a histogram.histogram.

x

P(X = x)

0 1 2 3

0.10

0.20

0.30

0.40