Discrete Random Variables

Numerical measures of probability experiments

Lesson Overview

Goals

Students will distinguish between discrete and continuous random variables

Students will identify discrete probability distributions

Instructor Presentation

Introduction

We all know if we flip a coin, only two outcomes are possible, Head or Tail.  But what happens when we flip the coin many times?  We can image that we would get some number of  heads and some number of tails.  The count of the number of heads (or tails for that matter) can only be a whole number.  It might be 0 heads, 1 head, 2 heads, or other, but we also know it can't be anything number but a whole number.  1.35 heads is impossible.

Discrete Random Variable has either a finite or countable number of values.

Labeled[Graphics[{PointSize[Large],Red,Point[Table[{t,0},{t,0,8}]],Arrow[{{0,0},{9,0}}]},Axes->True],"A Discrete Random Variable Looks Like This"]

Continuous Random Variable has indefinitely many values.

Labeled[Graphics[{Red, Thickness->Large,Arrow[{{0,0},{9,0}}]},Axes->True],"A Continuous Random Variable Looks Like This"]

Notes

We use capital letters to denote Random Variable sets, either discrete or continuous.

Example 1

Distinguishing between Discrete and Continuous Random Variables

The number of As expected as a final grade in this class:

The number of cars that travel through McDonalds drive through during a 30 minute period:

The speed of the next car as clocked by a state trooper:

Concept Exploration

Discrete Probability Distribution

When we take all possible values and match them with the probabilities of occurring, we have what is called the Probability Distribution.   The form for a Probability Distribution is normally a table, but sometimes a histogram is used.

Example Discrete Probability Distribution

data={{1,0.20},{2,0.35},{3,0.15},{4,0.10},{5,0.20}};
fulldata=Prepend[data,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.2`}, {2, 0.35`}, {3, 0.15`}, {4, 0.1`}, {5, 0.2`}}), "Discrete Probability Distribution"])

Notes

In order for the data set to be a Probability Distribution, all Probability values P(x) must:

0 ≤ P(x) ≤ 1

Total of all P(x) values must be equal to 1

Example 2

Identify the Discrete Probability Distribution:

#2.1

data2={{1,0.20},{2,0.35},{3,0.05},{4,0.10},{5,0.20}};
fulldata=Prepend[data2,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.2`}, {2, 0.35`}, {3, 0.05`}, {4, 0.1`}, {5, 0.2`}}), "Discrete Probability Distribution"])

Discrete Probability Distribution or Not?   Why?

#2.2

data3={{1,0.20},{2,0.45},{3,0.15},{4,0.25},{5,-0.05}};
fulldata=Prepend[data3,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.2`}, {2, 0.45`}, {3, 0.15`}, {4, 0.25`}, {5, -0.05`}}), "Discrete Probability Distribution"])

Discrete Probability Distribution or Not?   Why?

#2.3

data4={{1,0.10},{2,0.35},{3,0.05},{4,0.40},{5,0.10}};
fulldata=Prepend[data4,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.1`}, {2, 0.35`}, {3, 0.05`}, {4, 0.4`}, {5, 0.1`}}), "Discrete Probability Distribution"])

Discrete Probability Distribution or Not?   Why?

Constructing Probability Histograms

Sometimes a graphical depiction of the Discrete Probability Distribution is easier to understand. This depiction is called Probability Histogram.  The horizontal axis depicts the x value and the vertical axis represents the probability of each value (P(x)).   Using our example above:

data5={{1,0.20},{2,0.35},{3,0.15},{4,0.10},{5,0.20}};
fulldata=Prepend[data5,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.2`}, {2, 0.35`}, {3, 0.15`}, {4, 0.1`}, {5, 0.2`}}), "Discrete Probability Distribution"])

The Probability Histogram looks like this:

BarChart[data5[[All,2]],ChartLabels->data5[[All,1]]]

Examples

Example 3

Distinguishing between Discrete and Continuous Random Variables

The number of hits on a website each day:

The weight of a cafeteria salad:

The number of fish caught by each team during a 3-day fishing tournament:

Example 4

Identify if the table represents a Discrete Probability Distribution:

#4.1

data2={{1,0.20},{2,-0.35},{3,0.05},{4,0.10},{5,0.20}};
fulldata=Prepend[data2,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.2`}, {2, -0.35`}, {3, 0.05`}, {4, 0.1`}, {5, 0.2`}}), "Discrete Probability Distribution"])

Discrete Probability Distribution or Not?   Why?

#4.2

data3={{1,0.20},{2,0.45},{3,0.55},{4,0.25},{5,0.05}};
fulldata=Prepend[data3,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.2`}, {2, 0.45`}, {3, 0.55`}, {4, 0.25`}, {5, -0.05`}}), "Discrete Probability Distribution"])

Discrete Probability Distribution or Not?   Why?

#4.3

data4={{1,0.10},{2,0.35},{3,-0.05},{4,0.40},{5,0.10}};
fulldata=Prepend[data4,{"x","Probability (P(x))"}];
DisplayTable[fulldata,TableLabel->"Discrete Probability Distribution",ItemSize->13]

(Labeled[({{"x", "Probability (P(x))"}, {1, 0.1`}, {2, 0.35`}, {3, -0.05`}, {4, 0.4`}, {5, 0.1`}}), "Discrete Probability Distribution"])

Discrete Probability Distribution or Not?   Why?

Examples Answer Key

Example 1

Distinguishing between Discrete and Continuous Random Variables

The number of As expected as a final grade in this class:

Discrete

The number of cars that travel through McDonald drive through during a 30 minute period:

Discrete

The speed of the next car as clocked by a state trooper:

Continuous

Examples Answer Key

Example 2

Identify the Discrete Probability Distribution:

#2.1 Discrete Probability Distribution or Not?   Why?

Not.  One of the rules states that the Total (P (x)) is equal to 1.  This example is not.

#2.2 Discrete Probability Distribution or Not?   Why?

Not. 0 <= P (x) <= 1  for all P (x).  P (5) is - 0.05.

#2.3 Discrete Probability Distribution or Not?   Why?

Discrete Probability Distribution.  Both rules are satisfied.

Examples Answer Key

Example 3

Distinguishing between Discrete and Continuous Random Variables

The number of hits on a website each day:

Discrete

The weight of a cafeteria salad:

Continuous

The number of fish caught by each team during a 3-day fishing tournament:

Discrete

Examples Answer Key

Example 4

Identify if the table represents a Discrete Probability Distribution:

#4.1 Discrete Probability Distribution or Not?   Why?

Not.  P (x) Values must be greater than or equal to 0.  - 0.35 is not.

#4.2 Discrete Probability Distribution or Not?   Why?

Not.  Two problems exist here.  We know that 0 <= P (x) <= 1 and Total (P (x)) must equal 1.   This example fails both.

#4.3 Discrete Probability Distribution or Not?   Why?

Not.  P (x) Values must be greater than or equal to 0.  - 0.05 is not.

Initializations

DisplayTable[data_List,opts:OptionsPattern[]]:=CellPrint[TextCell[Labeled[Grid[data,FilterRules[{opts},Options[Grid]],Frame->All,ItemSize->14,Alignment->Center,BaseStyle->{FontFamily->"Helvetica",FontSize->18},Background->LightYellow,Frame->All,Spacings->{2,0.62}],Style[OptionValue[TableLabel],FontFamily->"Times", 16]],"DisplayFormula",ShowStringCharacters->False]]