Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Chapter 5: Discrete Probability Distributions, Study notes of Statistics

Since a pdf is basically a population, the mean and standard deviation that are calculated are actually the population parameters and not the sample statistics.

Typology: Study notes

2021/2022

Uploaded on 09/12/2022

eknathia
eknathia 🇺🇸

4.4

(26)

264 documents

1 / 30

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 5: Discrete Probability Distributions
157
Chapter 5: Discrete Probability Distributions
Section 5.1: Basics of Probability Distributions
As a reminder, a variable or what will be called the random variable from now on, is
represented by the letter x and it represents a quantitative (numerical) variable that is
measured or observed in an experiment.
Also remember there are different types of quantitative variables, called discrete or
continuous. What is the difference between discrete and continuous data? Discrete data
can only take on particular values in a range. Continuous data can take on any value in a
range. Discrete data usually arises from counting while continuous data usually arises
from measuring.
Examples of each:
How tall is a plant given a new fertilizer? Continuous. This is something you measure.
How many fleas are on prairie dogs in a colony? Discrete. This is something you count.
If you have a variable, and can find a probability associated with that variable, it is called
a random variable. In many cases the random variable is what you are measuring, but
when it comes to discrete random variables, it is usually what you are counting. So for
the example of how tall is a plant given a new fertilizer, the random variable is the height
of the plant given a new fertilizer. For the example of how many fleas are on prairie dogs
in a colony, the random variable is the number of fleas on a prairie dog in a colony.
Now suppose you put all the values of the random variable together with the probability
that that random variable would occur. You could then have a distribution like before,
but now it is called a probability distribution since it involves probabilities. A
probability distribution is an assignment of probabilities to the values of the random
variable. The abbreviation of pdf is used for a probability distribution function.
For probability distributions,
0P x
( )
1
and
P x
( )
=1
Example #5.1.1: Probability Distribution
The 2010 U.S. Census found the chance of a household being a certain size. The
data is in table #5.1.1 ("Households by age," 2013).
Table #5.1.1: Household Size from U.S. Census of 2010
Size of
household
1
2
3
4
5
6
7 or
more
Probability
26.7%
33.6%
15.8%
13.7%
6.3%
2.4%
1.5%
Solution:
In this case, the random variable is x = number of people in a household. This is a
discrete random variable, since you are counting the number of people in a
household.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Partial preview of the text

Download Chapter 5: Discrete Probability Distributions and more Study notes Statistics in PDF only on Docsity!

Chapter 5: Discrete Probability Distributions

Section 5.1: Basics of Probability Distributions

As a reminder, a variable or what will be called the random variable from now on, is

represented by the letter x and it represents a quantitative (numerical) variable that is

measured or observed in an experiment.

Also remember there are different types of quantitative variables, called discrete or

continuous. What is the difference between discrete and continuous data? Discrete data

can only take on particular values in a range. Continuous data can take on any value in a

range. Discrete data usually arises from counting while continuous data usually arises

from measuring.

Examples of each:

How tall is a plant given a new fertilizer? Continuous. This is something you measure.

How many fleas are on prairie dogs in a colony? Discrete. This is something you count.

If you have a variable, and can find a probability associated with that variable, it is called

a random variable. In many cases the random variable is what you are measuring, but

when it comes to discrete random variables, it is usually what you are counting. So for

the example of how tall is a plant given a new fertilizer, the random variable is the height

of the plant given a new fertilizer. For the example of how many fleas are on prairie dogs

in a colony, the random variable is the number of fleas on a prairie dog in a colony.

Now suppose you put all the values of the random variable together with the probability

that that random variable would occur. You could then have a distribution like before,

but now it is called a probability distribution since it involves probabilities. A

probability distribution is an assignment of probabilities to the values of the random

variable. The abbreviation of pdf is used for a probability distribution function.

For probability distributions, 0 ≤ P ( x ) ≤ 1 and P ( x )

Example #5.1.1: Probability Distribution

The 2010 U.S. Census found the chance of a household being a certain size. The

data is in table #5.1.1 ("Households by age," 2013).

Table #5.1.1: Household Size from U.S. Census of 2010

Size of

household 1 2 3 4 5 6

7 or

more

Probability 26.7% 33.6% 15.8% 13.7% 6.3% 2.4% 1.5%

Solution:

In this case, the random variable is x = number of people in a household. This is a

discrete random variable, since you are counting the number of people in a

household.

This is a probability distribution since you have the x value and the probabilities

that go with it, all of the probabilities are between zero and one, and the sum of all

of the probabilities is one.

You can give a probability distribution in table form (as in table #5.1.1) or as a graph.

The graph looks like a histogram. A probability distribution is basically a relative

frequency distribution based on a very large sample.

Example #5.1.2: Graphing a Probability Distribution

The 2010 U.S. Census found the chance of a household being a certain size. The

data is in the table ("Households by age," 2013). Draw a histogram of the

probability distribution.

Table #5.1.2: Household Size from U.S. Census of 20 10

Size of

household 1 2 3 4 5 6

7 or

more

Probability 26.7% 33.6% 15.8% 13.7% 6.3% 2.4% 1.5%

Solution:

State random variable:

x = number of people in a household

You draw a histogram, where the x values are on the horizontal axis and are the x

values of the classes (for the 7 or more category, just call it 7). The probabilities

are on the vertical axis.

Graph #5.1.1: Histogram of Household Size from U.S. Census of 2010

Notice this graph is skewed right.

Table #5.1.4: Calculating the Mean for a Discrete PDF

x 1 2 3 4 5 6 7

P(x) 0.267 0.336 0.158 0.137 0.063 0.024 0.01 5

xP ( x )

Now add up the new row and you get the answer 2.525. This is the mean or the

expected value, μ = 2.525 people. This means that you expect a household in the

U.S. to have 2.525 people in it. Now of course you can’t have half a person, but

what this tells you is that you expect a household to have either 2 or 3 people,

with a little more 3-person households than 2-person households.

b.) Find the variance

Solution:

To find the variance, again it is easier to use a table version than try to just the

formula in a line. Looking at the formula, you will notice that the first

operation that you should do is to subtract the mean from each x value. Then

you square each of these values. Then you multiply each of these answers by

the probability of each x value. Finally you add up all of these values.

Table #5.1.5: Calculating the Variance for a Discrete PDF

x 1 2 3 4 5 6 7

P(x) 0.267 0.336 0.158 0.137 0.063 0.024 0.01 5

x − μ (^) - 1.525 - 0.525 0.475 1.4 75 2.475 3.4 75 4.4 75

( x − μ)

2

2.3256 0.2756 0.2256 2.1756 6.1256 12.0756 20.

( x − μ)

2

P ( x )

Now add up the last row to find the variance, σ

2 = 2.023375 people

2

. (Note:

try not to round your numbers too much so you aren’t creating rounding error

in your answer. The numbers in the table above were rounded off because of

space limitations, but the answer was calculated using many decimal places.)

c.) Find the standard deviation

Solution:

To find the standard deviation, just take the square root of the variance,

σ = 2.023375 ≈ 1.422454 people. This means that you can expect a U.S.

household to have 2.525 people in it, with a standard deviation of 1.42 people.

d.) Use a TI-83/84 to calculate the mean and standard deviation.

Solution:

Go into the STAT menu, then the Edit menu. Type the x values into L1 and

the P(x) values into L2. Then go into the STAT menu, then the CALC menu.

Choose 1:1-Var Stats. This will put 1-Var Stats on the home screen. Now

type in L1,L2 (there is a comma between L1 and L2) and then press ENTER.

If you have the newer operating system on the TI-84, then your input will be

slightly different. You will see the output in figure #5.1.1.

Figure #5.1.1: TI-83/84 Output

The mean is 2.52 5 people and the standard deviation is 1.422 people.

e.) Using R to calculate the mean.

Solution:

The command would be weighted.mean(x, p). So for this example, the process

would look like:

x<-c(1, 2, 3, 4, 5, 6, 7)

p<-c(0.267, 0.336, 0.158, 0.137, 0.063, 0.024, 0.015)

weighted.mean(x, p)

Output:

[1] 2.

So the mean is 2.525.

To find the standard deviation, you would need to program the process into R.

So it is easier to just do it using the formula.

Example #5.1.4: Calculating the Expected Value

In the Arizona lottery called Pick 3, a player pays $1 and then picks a three-digit

number. If those three numbers are picked in that specific order the person wins

$500. What is the expected value in this game?

Similarly, if the P (the variable has a value of x or less) < 0.05, then you can consider this

an unusually low value. Another way to think of this is if the probability of getting a

value as small as x is less than 0.05, then the event x is considered unusual.

Why is it "x or more" or "x or less" instead of just "x" when you are determining if an

event is unusual? Consider this example: you and your friend go out to lunch every

day. Instead of Going Dutch (each paying for their own lunch), you decide to flip a coin,

and the loser pays for both. Your friend seems to be winning more often than you'd

expect, so you want to determine if this is unusual before you decide to change how you

pay for lunch (or accuse your friend of cheating). The process for how to calculate these

probabilities will be presented in the next section on the binomial distribution. If your

friend won 6 out of 10 lunches, the probability of that happening turns out to be about

20.5%, not unusual. The probability of winning 6 or more is about 37.7%. But what

happens if your friend won 501 out of 1,000 lunches? That doesn't seem so

unlikely! The probability of winning 501 or more lunches is about 47.8%, and that is

consistent with your hunch that this isn't so unusual. But the probability of winning

exactly 501 lunches is much less, only about 2.5%. That is why the probability of getting

exactly that value is not the right question to ask: you should ask the probability of

getting that value or more (or that value or less on the other side).

The value 0.05 will be explained later, and it is not the only value you can use.

Example #5.1.5: Is the Event Unusual

The 2010 U.S. Census found the chance of a household being a certain size. The

data is in the table ("Households by age," 2013).

Table #5.1.7: Household Size from U.S. Census of 2010

Size of

household 1 2 3 4 5 6

7 or

more

Probability 26.7% 33.6% 15.8% 13.7% 6.3% 2.4% 1.5%

Solution:

State random variable:

x = number of people in a household

a.) Is it unusual for a household to have six people in the family?

Solution:

To determine this, you need to look at probabilities. However, you cannot just

look at the probability of six people. You need to look at the probability of x

being six or more people or the probability of x being six or less people. The

P ( x ≤ 6 ) = P ( x = 1 ) + P ( x = 2 ) + P ( x = 3 ) + P ( x = 4 ) + P ( x = 5 ) + P ( x = 6 )

Since this probability is more than 5%, then six is not an unusually low value.

The

P ( x ≥ 6 ) = P ( x = 6 ) + P ( x ≥ 7 )

Since this probability is less than 5%, then six is an unusually high value. It is

unusual for a household to have six people in the family.

b.) If you did come upon many families that had six people in the family, what

would you think?

Solution:

Since it is unusual for a family to have six people in it, then you may think

that either the size of families is increasing from what it was or that you are in

a location where families are larger than in other locations.

c.) Is it unusual for a household to have four people in the family?

Solution:

To determine this, you need to look at probabilities. Again, look at the

probability of x being four or more or the probability of x being four or less.

The

P ( x ≥ 4 ) = P ( x = 4 ) + P ( x = 5 ) + P ( x = 6 ) + P ( x = 7 )

Since this probability is more than 5%, four is not an unusually high value.

The

P ( x ≤ 4 ) = P ( x = 1 ) + P ( x = 2 ) + P ( x = 3 ) + P ( x = 4 )

Since this probability is more than 5%, four is not an unusually low value.

Thus, four is not an unusual size of a family.

d.) If you did come upon a family that has four people in it, what would you

think?

Solution:

Since it is not unusual for a family to have four members, then you would not

think anything is amiss.

2.) Suppose you have an experiment where you flip a coin three times. You then

count the number of heads.

a.) State the random variable.

b.) Write the probability distribution for the number of heads.

c.) Draw a histogram for the number of heads.

d.) Find the mean number of heads.

e.) Find the variance for the number of heads.

f.) Find the standard deviation for the number of heads.

g.) Find the probability of having two or more number of heads.

h.) Is it unusual for to flip two heads?

3.) The Ohio lottery has a game called Pick 4 where a player pays $1 and picks a

four-digit number. If the four numbers come up in the order you picked, then you

win $2,500. What is your expected value?

4.) An LG Dishwasher, which costs $800, has a 20% chance of needing to be

replaced in the first 2 years of purchase. A two-year extended warrantee costs

$112.10 on a dishwasher. What is the expected value of the extended warranty

assuming it is replaced in the first 2 years?

Section 5.2: Binomial Probability Distribution

Section 5.1 introduced the concept of a probability distribution. The focus of the section

was on discrete probability distributions (pdf). To find the pdf for a situation, you

usually needed to actually conduct the experiment and collect data. Then you can

calculate the experimental probabilities. Normally you cannot calculate the theoretical

probabilities instead. However, there are certain types of experiment that allow you to

calculate the theoretical probability. One of those types is called a Binomial

Experiment.

Properties of a binomial experiment (or Bernoulli trial):

  1. Fixed number of trials, n , which means that the experiment is repeated a specific

number of times.

  1. The n trials are independent, which means that what happens on one trial does not

influence the outcomes of other trials.

  1. There are only two outcomes, which are called a success and a failure.

  2. The probability of a success doesn’t change from trial to trial, where p = probability of

success and q = probability of failure, q^ =^1 −^ p^.

If you know you have a binomial experiment, then you can calculate binomial

probabilities. This is important because binomial probabilities come up often in real life.

Examples of binomial experiments are:

Toss a fair coin ten times, and find the probability of getting two heads.

Question twenty people in class, and look for the probability of more than half

being women?

Shoot five arrows at a target, and find the probability of hitting it five times?

To develop the process for calculating the probabilities in a binomial experiment,

consider example #5.2.1.

Example #5.2.1: Deriving the Binomial Probability Formula

Suppose you are given a 3 question multiple-choice test. Each question has 4

responses and only one is correct. Suppose you want to find the probability that

you can just guess at the answers and get 2 questions right. (Teachers do this all

the time when they make up a multiple-choice test to see if students can still pass

without studying. In most cases the students can’t.) To help with the idea that

you are going to guess, suppose the test is in Martian.

a.) What is the random variable?

Solution:

x = number of correct answers

P ( 2 correct answers) = P ( RRW) + P ( RWR) + P ( WRR)

2 3

1

2 3

1

2 3

1

2 3

1

d.) What is the probability of getting zero right, one right, and all three right?

Solution:

You could go through the same argument that you did above and come up

with the following:

r right P(r right)

0 right

1 *

0 3

3

1 right

1 3

2

2 right

2 3

1

3 right

3 3

0

Hopefully you see the pattern that results. You can now write the general formula

for the probabilities for a Binomial experiment

First, the random variable in a binomial experiment is x = number of successes.

Be careful, a success is not always a good thing. Sometimes a success is something that

is bad, like finding a defect. A success just means you observed the outcome you wanted

to see happen.

Binomial Formula for the probability of r successes in n trials is

P ( x = r ) =

n

C

r

p

r q

nr where n

C

r

n!

r !( n − r )!

The n

C

r

is the number of combinations of n things taking r at a time. It is read “ n choose

r ”. Some other common notations for n choose r are C n , r

, and

n

r

. n! means you are

multiplying n * ( n − 1 )* ( n − 2 ) 2 * 1. As an example, 5! = 5 * 4 * 3 * 2 * 1 = 120.

When solving problems, make sure you define your random variable and state what n , p ,

q , and r are. Without doing this, the problems are a great deal harder.

Example #5.2.2: Calculating Binomial Probabilities

When looking at a person’s eye color, it turns out that 1% of people in the world

has green eyes ("What percentage of," 2013). Consider a group of 20 people.

a.) State the random variable.

Solution:

x = number of people with green eyes

b.) Argue that this is a binomial experiment

Solution:

1.) There are 20 people, and each person is a trial, so there are a fixed number

of trials. In this case, n = 20.

2.) If you assume that each person in the group is chosen at random the eye

color of one person doesn’t affect the eye color of the next person, thus the

trials are independent.

3.) Either a person has green eyes or they do not have green eyes, so there are

only two outcomes. In this case, the success is a person has green eyes.

4.) The probability of a person having green eyes is 0.01. This is the same for

every trial since each person has the same chance of having green eyes.

p = 0.01 and q = 1 − 0.01 = 0.

Find the probability that

c.) None have green eyes.

Solution:

P ( x = 0 ) =

20

C

0

0

20 − 0 ≈ 0.

d.) Nine have green eyes.

Solution:

P ( x = 9 ) =

20

C

9

9

20 − 9 ≈ 1.50 × 10

− 13 ≈ 0.

e.) At most three have green eyes.

Solution:

At most three means that three is the highest value you will have. Find the

probability of x is less than or equal to three.

The binomial formula is cumbersome to use, so you can find the probabilities by using

technology. On the TI-83/84 calculator, the commands on the TI-83/84 calculators when

the number of trials is equal to n and the probability of a success is equal to p are

binompdf ( n , p , r ) when you want to find P ( x = r ) and binomcdf ( n , p , r ) when you want

to find P ( x ≤ r ). If you want to find P ( x ≥ r ) , then you use the property that

P ( x ≥ r ) = 1 − P ( x ≤ r − 1 ) , since x ≥ r and x < r or x ≤ r − 1 are complementary events.

Both binompdf and binomcdf commands are found in the DISTR menu. Using R, the

commands are P ( x = r ) = dbinom ( r , n , p ) and P ( x ≤ r ) = pbinom ( r , n , p ).

Example #5.2.3: Using the Binomial Command on the TI-83/

When looking at a person’s eye color, it turns out that 1% of people in the world

has green eyes ("What percentage of," 2013). Consider a group of 20 people.

a.) State the random variable.

Solution:

x = number of people with green eyes

Find the probability that

b.) None have green eyes.

Solution:

You are looking for P^ ( x^ =^0 ). Since this problem is x = 0 , you use the

binompdf command on the TI-83/84 or dbinom command on R. On the TI-

83/84, you go to the DISTR menu, select the binompdf, and then type into the

parenthesis your n , p , and r values into your calculator, making sure you use

the comma to separate the values. The command will look like

binompdf ( 20 ,.01, 0 ) and when you press ENTER you will be given the

answer. (If you have the new software on the TI-84, the screen looks a bit

different.)

Figure #5.2.1: Calculator Results for binompdf

On R, the command would look like dbinom(0, 20, 0.01)

P ( x = 0 ) = 0.8179 . Thus there is an 81.8% chance that in a group of 20

people none of them will have green eyes.

c.) Nine have green eyes.

Solution:

In this case you want to find the P ( x = 9 ). Again, you will use the binompdf

command or the dbinom command. Following the procedure above, you will

have binompdf ( 20 ,.01, 9 ) on the TI-83/84 or dbinom(9,20,0.01) on R. Your

answer is P ( x = 9 ) = 1.50 × 10

− 13

. (Remember when the calculator gives you

1.50 E − 13 and R give you 1.50 e − 13 , this is how they display scientific

notation.) The probability that out of twenty people, nine of them have green

eyes is a very small chance.

d.) At most three have green eyes.

Solution:

At most three means that three is the highest value you will have. Find the

probability of x being less than or equal to three, which is P^ ( x^ ≤^3 ). This uses

the binomcdf command on the TI-83/84 and pbinom command in R. You use

the command on the TI-83/84 of binomcdf^ ( 20 ,.01,^3 ) and the command on R

of pbinom(3,20,0.01)

Figure #5.2.2: Calculator Results for binomcdf

Your answer is 0.99996. Thus there is a really good chance that in a group of

20 people at most three will have green eyes. (Note: don’t round this to one,

since one means that the event will happen, when in reality there is a slight

chance that it won’t happen. It is best to write the answer out to enough

decimal points so it doesn’t round off to one.

2.) If you assume that each child in the group is chosen at random, then

whether a child has autism does not affect the chance that the next child

has autism. Thus the trials are independent.

3.) Either a child has autism or they do not have autism, so there are two

outcomes. In this case, the success is a child has autism.

4.) The probability of a child having autism is 1/88. This is the same for

every trial since each child has the same chance of having autism. p =

and q = 1 −

Find the probability that

c.) None have autism.

Solution:

Using the formula:

P ( x = 0 ) =

10

C

0

0 87

10 − 0

Using the TI-83/84 Calculator:

P ( x = 0 ) = binompdf ( 10 , 1 ÷ 88 , 0 ) ≈ 0.

Using R:

P ( x = 0 ) = pbinom ( 0 , 10 , 1 / 88 ) ≈ 0.

d.) Seven have autism.

Solution:

Using the formula:

P ( x = 7 ) =

10

C

7

7 87

10 − 7

Using the TI-83/84 Calculator:

P ( x = 7 ) = binompdf ( 10 , 1 ÷ 88 , 7 ) ≈ 2.84 × 10

− 12

Using R:

P ( x = 7 ) = dbinom ( 7 , 10 , 1 / 88 ) ≈ 2.84 × 10

− 12

e.) At least five have autism.

Solution:

Using the formula:

P ( x ≥ 5 ) = P ( x = 5 ) + P ( x = 6 ) + P ( x = 7 )

+ P ( x = 8 ) + P ( x = 9 ) + P ( x = 10 )

10

C

5

5 78

10 − 5

10

C

6

6 78

10 − 6

10

C

7

7 78

10 − 7

10

C

8

8 78

10 − 8

10

C

9

9 78

10 − 9

10

C

10

10 78

10 − 10

Using the TI-83/84 Calculator:

To use the calculator you need to use the complement.

P ( x ≥ 5 ) = 1 − P ( x < 5 )

= 1 − P ( x ≤ 4 )

= 1 − binomcdf ( 10 , 1 ÷ 88 , 4 )

Using R:

To use R you need to use the complement.

P ( x ≥ 5 ) = 1 − P ( x < 5 )

= 1 − P ( x ≤ 4 )

= 1 − pbinom ( 4 , 10 , 1 / 88 )

Notice, the answer is given as 0.000, since the answer is less than 0.000.

Don’t write 0, since 0 means that the event is impossible to happen. The

event of five or more is improbable, but not impossible.