21
Modeling Modeling Discrete Discrete Variables Variables Lecture 22-1 Lecture 22-1 Sections 6.4 Sections 6.4 Wed, Mar 1, 2006 Wed, Mar 1, 2006

Modeling Discrete Variables

  • Upload
    lucine

  • View
    47

  • Download
    1

Embed Size (px)

DESCRIPTION

Modeling Discrete Variables. Lecture 22-1 Sections 6.4 Wed, Mar 1, 2006. Two Types of Variable. Discrete variable – A variable whose set of possible values is a set of isolated points on the number line. - PowerPoint PPT Presentation

Citation preview

Page 1: Modeling Discrete Variables

Modeling Modeling Discrete Discrete VariablesVariables

Lecture 22-1Lecture 22-1

Sections 6.4Sections 6.4

Wed, Mar 1, 2006Wed, Mar 1, 2006

Page 2: Modeling Discrete Variables

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

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

Example of a Discrete Example of a Discrete VariableVariable

We may list each value and its We may list each value and its proportion.proportion. For 0.10 of the population, For 0.10 of the population, XX = 0. = 0. For 0.30 of the population, For 0.30 of the population, XX = 1. = 1. For 0.40 of the population, For 0.40 of the population, XX = 2. = 2. For 0.20 of the population, For 0.20 of the population, XX = 3. = 3.

Page 5: Modeling Discrete Variables

Example of a Discrete Example of a Discrete VariableVariable

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

Value ofValue of XX

ProportioProportionn

00 0.100.10

11 0.300.30

22 0.400.40

33 0.200.20

Page 6: Modeling Discrete Variables

Graphing a Discrete Graphing a Discrete VariableVariable

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

x

P(X = x)

0 1 2 3

0.10

0.20

0.30

0.40

Page 7: Modeling Discrete Variables

Graphing a Discrete Graphing a Discrete VariableVariable

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

Page 8: Modeling Discrete Variables

Discrete Random Discrete Random VariablesVariables

Lecture 22-2Lecture 22-2

Section 7.5.1Section 7.5.1

Wed, Mar 1, 2006Wed, Mar 1, 2006

Page 9: Modeling Discrete Variables

Random VariablesRandom Variables

Random variableRandom variable – A variable whose – A variable whose value is determined by the outcome of value is determined by the outcome of a procedure.a procedure.

The procedure includes at least one The procedure includes at least one step whose outcome is left to chance.step whose outcome is left to chance.

Therefore, the random variable takes Therefore, the random variable takes on a new value each time the 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

Types of Random Types of Random VariablesVariables

Discrete Random VariableDiscrete Random Variable – A – A random variable whose set of random variable whose set of possible values is a discrete set.possible values is a discrete set.

Continuous Random VariableContinuous Random Variable – A – A random variable whose set of random variable whose set of possible values is a continuous set.possible values is a continuous set.

Page 11: Modeling Discrete Variables

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 it was given an opportunity to times it was given an opportunity to happen.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 12: Modeling Discrete Variables

Examples of Random Examples of Random VariablesVariables

Roll two dice. Let Roll two dice. Let XX be the number of be the number of sixes.sixes. Possible values of Possible values of XX = {0, 1, 2}. = {0, 1, 2}.

Roll two dice. Let Roll two dice. Let XX be the total of the two be the total of the two numbers.numbers. Possible values of Possible values of XX = {2, 3, 4, …, 12}. = {2, 3, 4, …, 12}.

Select a person at random and give him up Select a person at random and give him up to one hour to perform a simple task. Let to one hour to perform a simple task. Let XX be the time it takes him to perform the be the time it takes him to perform the task.task. Possible values of Possible values of XX are { are {xx | 0 ≤ | 0 ≤ xx ≤ 1}. ≤ 1}.

Page 13: Modeling Discrete Variables

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 14: Modeling Discrete Variables

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 15: Modeling Discrete Variables

Rolling Two DiceRolling Two Dice

We can summarize this in a table.We can summarize this in a table.

XX PP((XX = = xx))

00 25/3625/36

11 10/3610/36

22 1/361/36

Page 16: Modeling Discrete Variables

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

5/36

15/36

25/36

30/36

20/36

10/36

Page 17: Modeling Discrete Variables

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

5/36

15/36

25/36

30/36

20/36

10/36

Page 18: Modeling Discrete Variables

Example of a Discrete Example of a Discrete PDFPDF

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

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

Then Then XX is a random variable. is a random variable. Which step in the procedure is left to Which step in the procedure is left to

chance?chance? What is the pdf of What is the pdf of XX??

Page 19: Modeling Discrete Variables

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 20: Modeling Discrete Variables

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 21: Modeling Discrete Variables

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