Distribution and Standard Deviation

Site: Saylor Academy
Course: CS250: Python for Data Science
Book: Distribution and Standard Deviation
Printed by: Guest user
Date: Thursday, May 23, 2024, 9:40 AM

Description

Terms and definitions from descriptive statistics readily carry over to situations where values are countable. The set of outcomes for a coin flip, the roll of a dice, or a set of cards are all examples of discrete random variables. We can then put concepts such as mean and standard deviation on a firmer mathematical footing by defining the expected value and the variance of a discrete random variable.

Probability Distribution Function (PDF) for a Discrete Random Variable

There are two types of random variables, discrete random variables and continuous random variables. The values of a discrete random variable are countable, which means the values are obtained by counting. All random variables we discussed in previous examples are discrete random variables. We counted the number of red balls, the number of heads, or the number of female children to get the corresponding random variable values. The values of a continuous random variable are uncountable, which means the values are not obtained by counting. Instead, they are obtained by measuring. For example, let X = temperature of a randomly selected day in June in a city. The value of X can be 68°, 71.5°, 80.6°, or 90.32°. These values are obtained by measuring by a thermometer. Another example of a continuous random variable is the height of a randomly selected high school student. The value of this random variable can be 5'2", 6'1", or 5'8". Those values are obtained by measuring by a ruler.

A discrete probability distribution function has two characteristics:

  • Each probability is between zero and one, inclusive.
  • The sum of the probabilities is one.


Example 4.1

A child psychologist is interested in the number of times a newborn baby's crying wakes its mother after midnight. For a random sample of 50 mothers, the following information was obtained. Let X = the number of times per week a newborn baby's crying wakes its mother after midnight. For this example, x = 0, 1, 2, 3, 4, 5.

P(x) = probability that X takes on a value x.

x P(x)
0   
P(x = 0) = \dfrac{2}{50}
1
P(x = 1) = \dfrac{11}{50}
2
P(x = 2) = \dfrac{23}{50}
3
P(x = 3) = \dfrac{9}{50}
4
P(x = 4) = \dfrac{4}{50}
5
P(x = 5) = \dfrac{1}{50}

Table 4.2


X takes on the values 0, 1, 2, 3, 4, 5. This is a discrete PDF because we can count the number of values of x and also because of the following two reasons:

  1. Each P(x) is between zero and one, therefore inclusive
  2. The sum of the probabilities is one, that is,

    \dfrac{2}{50}+\dfrac{11}{50}+\dfrac{23}{50}+\dfrac{9}{50}+\dfrac{4}{50}+\dfrac{1}{50}=1

Try It 4.1

A hospital researcher is interested in the number of times the average post-op patient will ring the nurse during a 12-hour shift. For a random sample of 50 patients, the following information was obtained. Let X = the number of times a patient rings the nurse during a 12-hour shift. For this exercise, x = 0, 1, 2, 3, 4, 5. P(x) = the probability that X takes on value x. Why is this a discrete probability distribution function (two reasons)?

x P(x)
0   
P(x = 0) = \dfrac{4}{50}
1
P(x = 1) = \dfrac{8}{50}
2
P(x = 2) = \dfrac{16}{50}
3
P(x = 3) = \dfrac{14}{50}
4
P(x = 4) = \dfrac{6}{50}
5
P(x = 5) = \dfrac{2}{50}

Table 4.3

Example 4.2

Suppose Nancy has classes three days a week. She attends classes three days a week 80 percent of the time, two days 15 percent of the time, one day 4 percent of the time, and no days 1 percent of the time. Suppose one week is randomly selected.

Describe the random variable in words. Let X = the number of days Nancy ________.

Solution 1

a. Let X = the number of days Nancy attends class per week.

b. In this example, what are possible values of X?

Solution 2

b. 0, 1, 2, and 3

c. Suppose one week is randomly chosen. Construct a probability distribution table (called a PDF table) like the one in Example 4.1. The table should have two columns labeled x and P(x).

Solution 3

c.

x    
P(x)
0    
.01
1 0.4
2 .15
3 .80

Table 4.4

The sum of the P(x) column is 0.01+0.04+0.15+0.80 = 1.00.


Try It 4.2
Jeremiah has basketball practice two days a week. 90 percent of the time, he attends both practices. Eight percent of the time, he attends one practice. Two percent of the time, he does not attend either practice. What is X and what values does it take on?


Source: OpenStax, https://openstax.org/books/statistics/pages/4-introduction
Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License.

Mean or Expected Value and Standard Deviation

The expected value of a discrete random variable X, symbolized as E(X), is often referred to as the long-term average or mean (symbolized as μ). This means that over the long term of doing an experiment over and over, you would expect this average. For example, let X = the number of heads you get when you toss three fair coins. If you repeat this experiment (toss three fair coins) a large number of times, the expected value of X is the number of heads you expect to get for each three tosses on average.


NOTE

To find the expected value, E(X), or mean μ of a discrete random variable X, simply multiply each value of the random variable by its probability and add the products. The formula is given as

E(X)=μ=∑xP(x).

Here x represents values of the random variable X, P(x) represents the corresponding probability, and symbol ∑ represents the sum of all products xP(x). Here we use symbol μ for the mean because it is a parameter. It represents the mean of a population.


Example 4.3

A men's soccer team plays soccer zero, one, or two days a week. The probability that they play zero days is .2, the probability that they play one day is .5, and the probability that they play two days is .3. Find the long-term average or expected value, μ, of the number of days per week the men's soccer team plays soccer.

To do the problem, first let the random variable X = the number of days the men's soccer team plays soccer per week. X takes on the values 0, 1, 2. Construct a PDF table adding a column x*P(x), the product of the value x with the corresponding probability P(x). In this column, you will multiply each x value by its probability.

x P(x) x*P(x)
0 .2 (0)(.2) = 0
1 .5 (1)(.5) = .5
2 .3 (2)(.3) = .6

Table 4.5 Expected Value Table This table is called an expected value table. The table helps you calculate the expected value or long-term average.

Add the last column x*P(x) to get the expected value/mean of the random variable X.

E(X)=μ=∑xP(x)=0+.5+.6=1.1

The expected value/mean is 1.1. The men's soccer team would, on the average, expect to play soccer 1.1 days per week. The number 1.1 is the long-term average or expected value if the men's soccer team plays soccer week after week after week.

As you learned, if you toss a fair coin, the probability that the result is heads is 0.5. This probability is a theoretical probability, which is what we expect to happen. This probability does not describe the short-term results of an experiment. If you flip a coin two times, the probability does not tell you that these flips will result in one head and one tail. Even if you flip a coin 10 times or 100 times, the probability does not tell you that you will get half tails and half heads. The probability gives information about what can be expected in the long term. To demonstrate this, Karl Pearson once tossed a fair coin 24,000 times! He recorded the results of each toss, obtaining heads 12,012 times. The relative frequency of heads is 12,012/24,000 = .5005, which is very close to the theoretical probability .5. In his experiment, Pearson illustrated the law of large numbers.

The law of large numbers states that, as the number of trials in a probability experiment increases, the difference between the theoretical probability of an event and the relative frequency approaches zero (the theoretical probability and the relative frequency get closer and closer together). The relative frequency is also called the experimental probability, a term that means what actually happens.

In the next example, we will demonstrate how to find the expected value and standard deviation of a discrete probability distribution by using relative frequency.

Like data, probability distributions have variances and standard deviations. The variance of a probability distribution is symbolized as σ^2 and the standard deviation of a probability distribution is symbolized as σ. Both are parameters since they summarize information about a population. To find the variance σ^2 of a discrete probability distribution, find each deviation from its expected value, square it, multiply it by its probability, and add the products. To find the standard deviation σ of a probability distribution, simply take the square root of variance σ^2. The formulas are given as below.

NOTE
The formula of the variance σ^2 of a discrete random variable X is

σ^2=∑(x−μ)^2P(x).

Here x represents values of the random variable X, μ is the mean of X, P(x) represents the corresponding probability, and symbol ∑ represents the sum of all products (x−μ)^2P(x).

To find the standard deviation, σ, of a discrete random variable X, simply take the square root of the variance σ^2.

σ=\sqrt{σ^2}=\sqrt{∑(x−μ)^2P(x)}


Example 4.4
A researcher conducted a study to investigate how a newborn baby’s crying after midnight affects the sleep of the baby's mother. The researcher randomly selected 50 new mothers and asked how many times they were awakened by their newborn baby's crying after midnight per week. Two mothers were awakened zero times, 11 mothers were awakened one time, 23 mothers were awakened two times, nine mothers were awakened three times, four mothers were awakened four times, and one mother was awakened five times. Find the expected value of the number of times a newborn baby's crying wakes its mother after midnight per week. Calculate the standard deviation of the variable as well.

To do the problem, first let the random variable X = the number of times a mother is awakened by her newborn’s crying after midnight per week. X takes on the values 0, 1, 2, 3, 4, 5. Construct a PDF table as below. The column of P(x) gives the experimental probability of each x value. We will use the relative frequency to get the probability. For example, the probability that a mother wakes up zero times is \dfrac{2}{50} since there are two mothers out of 50 who were awakened zero times. The third column of the table is the product of a value and its probability, xP(x).

x     
P(x) xP(x)
0 P(x = 0) =\dfrac{2}{50}
(0)(\dfrac{2}{50})=0
1 P(x = 1) =\dfrac{11}{50} (1)(\dfrac{11}{50})=\dfrac{11}{50}
2 P(x = 2) =\dfrac{23}{50} (2)(\dfrac{23}{50})=\dfrac{46}{50}
3 P(x = 3) =\dfrac{9}{50}
(3)(\dfrac{9}{50})=\dfrac{27}{50}
4 P(x = 4) =\dfrac{4}{50}
(4)(\dfrac{4}{50})=\dfrac{16}{50}
5
P(x = 5) =\dfrac{1}{50}
(5)(\dfrac{1}{50})=\dfrac{5}{50}

Table 4.6

We then add all the products in the third column to get the mean/expected value of X.

E(X)=μ=∑xP(x)=0+\dfrac{11}{50}+\dfrac{46}{50}+\dfrac{27}{50}+\dfrac{16}{50}+\dfrac{5}{50}=\dfrac{105}{50}=2.1

Therefore, we expect a newborn to wake its mother after midnight 2.1 times per week, on the average.

To calculate the standard deviation σ, we add the fourth column (x-μ)^2 and the fifth column (x−μ)^2∙P(x) to get the following table:

x P(x) xP(x) (x-µ)2 (x-µ)2•P(x)
0 P(x = 0) =\dfrac{2}{50}
(0)(\dfrac{2}{50})=0 (0−2.1)^2=4.41 4.41∙\dfrac{2}{50}=.1764
1 P(x = 1) =\dfrac{11}{50}
(1)(\dfrac{11}{50})=\dfrac{11}{50} (1−2.1)^2=1.21 1.21∙\dfrac{11}{50}=.2662
2 P(x = 2) =\dfrac{23}{50}
(2)(\dfrac{23}{50})=\dfrac{46}{50} (2−2.1)^2=.01 .01∙\dfrac{23}{50}=.0046
3 P(x = 3) =\dfrac{9}{50}
(3)(\dfrac{9}{50})=\dfrac{27}{50} (3−2.1)^2=.81 .81∙\dfrac{9}{50}=.1458
4 P(x = 4) =\dfrac{4}{50}
(4)(\dfrac{4}{50})=\dfrac{16}{50} (4−2.1)^2=3.61 3.61∙\frac{4}{50}=.2888
5 P(x = 5) =\dfrac{1}{50}
(5)(\dfrac{1}{50})=\dfrac{5}{50} (5−2.1)^2=8.41 8.41∙\dfrac{1}{50}=.1682

Table 4.7

We then add all the products in the 5th column to get the variance of X.

σ^2=.1764+.2662+.0046+.1458+.2888+.1682=1.05

To get the standard deviation σ, we simply take the square root of variance σ2.

σ=\sqrt{σ^2} = \sqrt{1.05} ≈1.0247

Try It 4.4
A hospital researcher is interested in the number of times the average post-op patient will ring the nurse during a 12-hour shift. For a random sample of 50 patients, the following information was obtained. What is the expected value?

x       
P(x)
0 P(x = 0) = \dfrac{4}{50}
1 P(x = 1) =\dfrac{8}{50}
2 P(x = 2) = \dfrac{16}{50}
3 P(x = 3) = \dfrac{14}{50}
4 P(x = 4) = \dfrac{6}{50}
5
P(x = 5) = \dfrac{2}{50}

Table 4.8


Example 4.5
Suppose you play a game of chance in which five numbers are chosen from 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. A computer randomly selects five numbers from zero to nine with replacement. You pay $2 to play and could profit $100,000 if you match all five numbers in order (you get your $2 back plus $100,000). Over the long term, what is your expected profit of playing the game?

To do this problem, set up a PDF table for the amount of money you can profit.

Let X = the amount of money you profit. If your five numbers match in order, you will win the game and will get your $2 back plus $100,000. That means your profit is $100,000. If your five numbers do not match in order, you will lose the game and lose your $2. That means your profit is -$2. Therefore, X takes on the values $100,000 and –$2. That is the second column x in the PDF table below.

To win, you must get all five numbers correct, in order. The probability of choosing the correct first number is \dfrac{1}{10}
because there are 10 numbers (from zero to nine) and only one of them is correct. The probability of choosing the correct second number is also \dfrac{1}{10} because the selection is done with replacement and there are still 10 numbers (from zero to nine) for you to choose. Due to the same reason, the probability of choosing the correct third number, the correct fourth number, and the correct fifth number are also \dfrac{1}{10}. The selection of one number does not affect the selection of another number. That means the five selections are independent. The probability of choosing all five correct numbers and in order is equal to the product of the probabilities of choosing each number correctly.

 \text{P(choosing all five numbers correctly) }\text{ P(choosing 1st number correctly) } \cdot \text{ P(choosing 2nd number correctly) } \cdot \text{ P(choosing 5th number correctly) } = (\dfrac{1}{10})\cdot (\dfrac{1}{10})\cdot (\dfrac{1}{10})\cdot(\dfrac{1}{10})\cdot (\dfrac{1}{10})=.00001

Therefore, the probability of winning is .00001 and the probability of losing is 1 − .00001 = .99999. That is how we get the third column P(x) in the PDF table below.

To get the fourth column xP(x) in the table, we simply multiply the value x with the corresponding probability P(x).

The PDF table is as follows:

x
P(x) x*P(x)
Loss   
–2 .99999 (–2)(.99999) = –1.99998
Profit
100,000 .00001 (100000)(.00001) = 1

Table 4.9

We then add all the products in the last column to get the mean/expected value of X.

E(X)=μ=∑xP(x)=−1.99998+1=−.9998.

Since –.99998 is about –1, you would, on average, expect to lose approximately $1 for each game you play. However, each time you play, you either lose $2 or profit $100,000. The $1 is the average or expected loss per game after playing this game over and over.


Try It 4.5
You are playing a game of chance in which four cards are drawn from a standard deck of 52 cards. You guess the suit of each card before it is drawn. The cards are replaced in the deck on each draw. You pay $1 to play. If you guess the right suit every time, you get your money back and $256. What is your expected profit of playing the game over the long term?


Example 4.6
Suppose you play a game with a biased coin. You play each game by tossing the coin once. \text{ P(heads) } = \dfrac{2}{3} and \text{ P(tails) } =\dfrac{1}{3}. If you toss a head, you pay $6. If you toss a tail, you win $10. If you play this game many times, will you come out ahead?

a. Define a random variable X.

Solution 1
a. X = amount of profit

b. Complete the following expected value table.

x      
____ 
 ____
WIN    
10     \dfrac{1}{3}  ____
LOSE     ____ ____  \dfrac{-12}{3}

Table 4.10

Solution 2
b.

x      
P(x)
xP(x)
WIN    
10     \dfrac{1}{3}  \dfrac{10}{3}
LOSE     -6 \dfrac{2}{3}  \dfrac{-12}{3}

Table 4.11



c. What is the expected value, μ? Do you come out ahead?

Solution 3
c. Add the last column of the table. The expected value E(X)=μ=\dfrac{10}{3}+(−\dfrac{12}{3})=−\dfrac{2}{3}≈−.67. You lose, on average, about 67 cents each time you play the game, so you do not come out ahead.


Try It 4.6
Suppose you play a game with a spinner. You play each game by spinning the spinner once. P(red) = \dfrac{2}{5}, P(blue) = \dfrac{2}{5}, and P(green) = \dfrac{1}{5}. If you land on red, you pay $10. If you land on blue, you don't pay or win anything. If you land on green, you win $10. Complete the following expected value table.


x P(x)
Red

-\dfrac{20}{5}
Blue
\dfrac{2}{5}
Green 10


Table 4.12

Generally for probability distributions, we use a calculator or a computer to calculate μ and σ to reduce rounding errors. For some probability distributions, there are shortcut formulas for calculating μ and σ.

Example 4.7
Toss a fair, six-sided die twice. Let X = the number of faces that show an even number. Construct a table like Table 4.12 and calculate the mean μ and standard deviation σ of X.

Solution 1
Tossing one fair six-sided die twice has the same sample space as tossing two fair six-sided dice. The sample space has 36 outcomes.

(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)

Table 4.13

Use the sample space to complete the following table.

x P(x) xP(x) (x-μ)2 ⋅ P(x)
0 \dfrac{9}{36} 0 (0-1)^2 \cdot \dfrac{9}{36} = \dfrac{9}{36}
1 \dfrac{18}{36} \dfrac{18}{36}  (1-1)^2 \cdot \dfrac{18}{36} = 0
2 \dfrac{9}{36} \dfrac{18}{36} (2-1)^2 \cdot \dfrac{9}{36} = \dfrac{9}{36}

Table 4.14 Calculating μ and σ.

Add the values in the third column to find the expected value: μ = \dfrac{36}{36} = 1. Use this value to complete the fourth column.

Add the values in the fourth column and take the square root of the sum: σ = \sqrt{\dfrac{18}{36}} ≈ .7071.

Some of the more common discrete probability functions are binomial, geometric, hypergeometric, and Poisson. Most elementary courses do not cover the geometric, hypergeometric, and Poisson. Your instructor will let you know if he or she wishes to cover these distributions.

A probability distribution function is a pattern. You try to fit a probability problem into a pattern or distribution in order to perform the necessary calculations. These distributions are tools to make solving probability problems easier. Each distribution has its own special characteristics. Learning the characteristics enables you to distinguish among the different distributions.

Binomial Distribution (Optional)

There are three characteristics of a binomial experiment:

  1. There are a fixed number of trials. Think of trials as repetitions of an experiment. The letter n denotes the number of trials.
  2. There are only two possible outcomes, called success and failure, for each trial. The outcome that we are measuring is defined as a success, while the other outcome is defined as a failure. The letter p denotes the probability of a success on one trial, and q denotes the probability of a failure on one trial. p + q = 1.
  3. The n trials are independent and are repeated using identical conditions. Because the n trials are independent, the outcome of one trial does not help in predicting the outcome of another trial. Another way of saying this is that for each individual trial, the probability, p, of a success and probability, q, of a failure remain the same. Let us look at several examples of a binomial experiment.
Example 1: Toss a fair coin once and record the result.

This is a binomial experiment since it meets all three characteristics. The number of trials n = 1. There are only two outcomes, a head or a tail, of each trial. We can define a head as a success if we are measuring number of heads. For a fair coin, the probabilities of getting head or tail are both .5. So, p = q − .5. Both p and q remain the same from trial to trial. This experiment is also called a Bernoulli trial, named after Jacob Bernoulli who, in the late 1600s, studied such trials extensively. Any experiment that has characteristics two and three and where n = 1 is called a Bernoulli trial. A binomial experiment takes place when the number of successes is counted in one or more Bernoulli trials.

Example 2: Randomly guess a multiple choice question has A, B, C and D four options.

This is a binomial experiment since it meets all three characteristics. The number of trials n = 1. There are only two outcomes, guess correctly or guess wrong, of each trial. We can define guess correctly as a success. For a random guess (you have no clue at all), the probability of guessing correct should be \dfrac{1}{4} because there are four options and only one option is correct. So, and p=\dfrac{1}{4} and q=1−p=1−\dfrac{1}{4}=\dfrac{3}{4}. Both p and q remain the same from trial to trial. This experiment is also a Bernoulli trial. It meets the characteristics two and three and n = 1.

Example 3: Toss a fair coin five times and record the result.

This is a binomial experiment since it meets all three characteristics. The number of trials n = 5. There are only two outcomes, head or tail, of each trial. If we define head as a success, then p = q = 0.5. Both p and q remain the same for each trial. Since n = 5, this experiment is not a Bernoulli trial although it meets the characteristics two and three.

Example 4: Randomly guess 10 multiple choice questions in an exam. Each question has A, B, C and D four options.

This is a binomial experiment since it meets all three characteristics. The number of trials n = 10. There are only two outcomes, guess correctly or guess wrong, of each trial. We can define guess correctly as a success. As we explained in example 2, p=\dfrac{1}{4} and q=1−p=1−\dfrac{1}{4}=\dfrac{3}{4}. Both p and q remain the same for each guess. Since n = 10, this experiment is not a Bernoulli trial.

The next two experiments are not binomial experiments.

Example 5: Randomly select two balls from a jar with five red balls and five blue balls without replacement. This means we select the first ball, and then without returning the selected ball into the jar, we will select the second ball.

This is not a binomial experiment since the third characteristic is not met. The number of trials n = 2. There are only two outcomes, a red ball or a blue ball, of each trial. If we define selecting a red ball as a success, then selecting a blue ball is a failure. The probability of getting the first ball red is \dfrac{5}{10} since there are five red balls out of 10 balls. So, p=\dfrac{5}{10} and  q=1−p=1−\dfrac{5}{10}=\dfrac{5}{10}. However, p and q do not remain the same for the second trial. If the first ball selected is red, then the probability of getting the second ball red is \dfrac{4}{9} since there are only four red balls out of nine balls. But if the first ball selected is blue, then the probability of getting the second ball red is \dfrac{5}{9} since there are still five red balls out of nine balls.

Example 6: Toss a fair coin until a head appears.

This is not a binomial experiment since the first characteristic is not met. The number of trials n is not fixed. n could be 1 if a head appears from the first toss. n could be 2 if the first toss is a tail and the second toss is a head. So on and so forth.

More examples of binomial and non-binomial experiments will be discussed in this section later.

The outcomes of a binomial experiment fit a binomial probability distribution. The random variable X = the number of successes obtained in the n independent trials.

There are shortcut formulas for calculating mean μ, variance σ2, and standard deviation σ of a binomial probability distribution. The formulas are given as below. The deriving of these formulas will not be discussed in this book.

μ=np, σ^2=npq, σ=\sqrt{npq}.

Here n is the number of trials, p is the probability of a success, and q is the probability of a failure.


Example 4.8

At ABC High School, the withdrawal rate from an elementary physics course is 30 percent for any given term. This implies that, for any given term, 70 percent of the students stay in the class for the entire term. The random variable X = the number of students who withdraw from the randomly selected elementary physics class. Since we are measuring the number of students who withdrew, a success is defined as an individual who withdrew.


Try It 4.8

The state health board is concerned about the amount of fruit available in school lunches. Forty-eight percent of schools in the state offer fruit in their lunches every day. This implies that 52 percent do not. What would a success be in this case?


Example 4.9

Suppose you play a game that you can only either win or lose. The probability that you win any game is 55 percent, and the probability that you lose is 45 percent. Each game you play is independent. If you play the game 20 times, write the function that describes the probability that you win 15 of the 20 times. Here, if you define X as the number of wins, then X takes on the values 0, 1, 2, 3, . . ., 20. The probability of a success is p = 0.55. The probability of a failure is q = .45. The number of trials is n = 20. The probability question can be stated mathematically as P(x = 15). If you define X as the number of losses, then a success is defined as a loss and a failure is defined as a win. A success does not necessarily represent a good outcome. It is simply the outcome that you are measuring. X still takes on the values of 0, 1, 2, 3, . . ., 20. The probability of a success is p=.45. The probability of a failure is q=.55.


Try It 4.9

A trainer is teaching a dolphin to do tricks. The probability that the dolphin successfully performs the trick is 35 percent, and the probability that the dolphin does not successfully perform the trick is 65 percent. Out of 20 attempts, you want to find the probability that the dolphin succeeds 12 times. State the probability question mathematically.


Example 4.10

A fair coin is flipped 15 times. Each flip is independent. What is the probability of getting more than 10 heads? Let X = the number of heads in 15 flips of the fair coin. X takes on the values 0, 1, 2, 3, . . ., 15. Since the coin is fair, p = .5 and q = .5. The number of trials n = 15. State the probability question mathematically.

Solution 1

P(x > 10)


Try It 4.10

A fair, six-sided die is rolled 10 times. Each roll is independent. You want to find the probability of rolling a one more than three times. State the probability question mathematically.


Example 4.11

Approximately 70 percent of statistics students do their homework in time for it to be collected and graded. Each student does homework independently. In a statistics class of 50 students, what is the probability that at least 40 will do their homework on time? Students are selected randomly.

a. This is a binomial problem because there is only a success or a ________, there are a fixed number of trials, and the probability of a success is .70 for each trial.

Solution 1

a. failure

b. If we are interested in the number of students who do their homework on time, then how do we define X?

Solution 2

b. X = the number of statistics students who do their homework on time

c. What values does x take on?

Solution 3

c. 0, 1, 2, . . ., 50

d. What is a failure, in words?

Solution 4

d. Failure is defined as a student who does not complete his or her homework on time.

The probability of a success is p = .70. The number of trials is n = 50.

e. If p + q = 1, then what is q?

Solution 5

e. q = .30

f. The words at least translate as what kind of inequality for the probability question P(x ____ 40)?

Solution 6

f. greater than or equal to (≥)
The probability question is P(x ≥ 40).


Try It 4.11

Sixty-five percent of people pass the state driver's exam on the first try. A group of 50 individuals who have taken the driver's exam is randomly selected. Give two reasons why this is a binomial problem.



Notation for the Binomial: B = Binomial Probability Distribution Function


X ~ B(n, p)

Read this as X is a random variable with a binomial distribution. The parameters are n and p: n = number of trials, p = probability of a success on each trial.


Example 4.12

It has been stated that about 41 percent of adult workers have a high school diploma but do not pursue any further education. If 20 adult workers are randomly selected, find the probability that at most 12 of them have a high school diploma but do not pursue any further education. How many adult workers do you expect to have a high school diploma but do not pursue any further education?

Let X = the number of workers who have a high school diploma but do not pursue any further education.

X takes on the values 0, 1, 2, . . ., 20 where n = 20, p = .41, and q = 1 – .41 = .59. X ~ B(20, .41)

Find P(x ≤ 12). There is a formula to define the probability of a binomial distribution P(x). We can use the formula to find P(x≤12). But the calculation is tedious and time consuming, and people usually use a graphing calculator, software, or binomial table to get the answer. Use a graphing calculator, you can get P(x≤12)=.9738. The instruction of TI-83, 83+, 84, 84+ is given below.


Using the TI-83, 83+, 84, 84+ Calculator

Go into 2nd DISTR. The syntax for the instructions are as follows:

To calculate the probability of a value P(x=value)
: use binompdf(n, p, number)
. Here binompdf represents binomial probability density function. It is used to find the probability that a binomial random variable is equal to an exact value. n is the number of trials, p is the probability of a success, and number is the value. If number is left out, which means use binompdf(n, p), then all the probabilities P(x=0),P(x=1),…,P(x=n) will be calculated.

To calculate the cumulative probability P(x≤value): use binomcdf(n, p, number). Here binomcdf represents binomial cumulative distribution function. It is used to determine the probability of at most type of problem, the probability that a binomial random variable is less than or equal to a value. n is the number of trials, p is the probability of a success, and number is the value. If number is left out, all the cumulative probabilities P(x≤0),P(x≤1),…,P(x≤n) will be calculated.

To calculate the cumulative probability P(x≥value): use 1 - binomcdf(n, p, number). n is the number of trials, p is the probability of a success, and number is the value. TI calculators do not have a built-in function to find the probability that a binomial random variable is greater than a value. However, we can use the fact that

 P(x > value)=1−P(x ≤ value)

to find the answer.

For this problem: After you are in 2nd DISTR, arrow down to binomcdf. Press ENTER. Enter 20,.41,12). The result is P(x ≤ 12) = .9738.


NOTE

If you want to find P(x = 12), use the pdf (binompdf). If you want to find P(x > 12), use 1 − binomcdf(20,.41,12).

The probability that at most 12 workers have a high school diploma but do not pursue any further education is .9738.

The graph of X ~ B(20, .41) is as follows.

This is a probability distribution histogram, graphing X ~ B(20, .41)


The previous graph is called a probability distribution histogram. It is made of a series of vertical bars. The x-axis of each bar is the value of X = the number of workers who have only a high school diploma, and the height of that bar is the probability of that value occurring.

The number of adult workers that you expect to have a high school diploma but not pursue any further education is the mean, μ = np = (20)(.41) = 8.2.

The formula for the variance is σ^2 = npq. The standard deviation is σ = \sqrt{npq}. σ = \sqrt{(20)(.41)(.59)} = 2.20.

The following is the interpretation of the mean μ=8.2 and standard deviation σ=2.20:

If you randomly select 20 adult workers, and do that over and over, you expect around eight adult workers out of 20 to have a high school diploma but do not pursue any further education on average. And you expect that to vary by about two workers on average.


Try It 4.12

About 32 percent of students participate in a community volunteer program outside of school. If 30 students are selected at random, find the probability that at most 14 of them participate in a community volunteer program outside of school. Use the TI-83+ or TI-84 calculator to find the answer.


Example 4.13

A store releases a 560-page art supply catalog. Eight of the pages feature signature artists. Suppose we randomly sample 100 pages. Let X = the number of pages that feature signature artists.

  1. What values does x take on?
  2. What is the probability distribution? Find the following probabilities:
    1. the probability that two pages feature signature artists
    2. the probability that at most six pages feature signature artists
    3. the probability that more than three pages feature signature artists
  3. Using the formulas, calculate the (i) mean and (ii) standard deviation.


Solution 1
  1. x = 0, 1, 2, 3, 4, 5, 6, 7, 8
  2. This is a binomial experiment since all three characteristics are met. Each page is a trial. Since we sample 100 pages, the number of trials is n = 100. For each page, there are two possible outcomes, features signature artists or does not feature signature artists. Since we are measuring the number of pages that feature signature artists, a page that features signature artists is defined as a success and a page that does not feature signature artists is defined as a failure. There are 8 out of 560 pages that feature signature artists. Therefore the probability of a success p=\dfrac{8}{560} and the probability of a failure q=1−p=1−\dfrac{8}{560}=\dfrac{552}{560}.
    Both p and q remain the same for each page. Therefore, X is a binomial random variable, and it can be written as X~B(100 \dfrac{8}{560}.

    We can use a graphing calculator to answer Parts i to iii.
    1. P(x = 2) = binompdf (100,\dfrac{8}{560},2) = .2466
    2. P(x ≤ 6) = binomcdf (100,\dfrac{8}{560},6) = .9994
    3. P(x > 3) = 1 – P(x ≤ 3) = 1 – binomcdf (100,\dfrac{8}{560},3) = 1 – .9443 = .0557

    1. mean = np = (100)(\dfrac{8}{560}) = \dfrac{800}{560} ≈ 1.4286
      standard deviation =  \sqrt{npq} = \sqrt{(100)(\dfrac{8}{560})(\dfrac{552}{560})} ≈ 1.1867


Try It 4.13

According to a poll, 60 percent of American adults prefer saving over spending. Let X = the number of American adults out of a random sample of 50 who prefer saving to spending.

  1. What is the probability distribution for X?
  2. Use your calculator to find the following probabilities:
    1. The probability that 25 adults in the sample prefer saving over spending
    2. The probability that at most 20 adults prefer saving
    3. The probability that more than 30 adults prefer saving
  3. Using the formulas, calculate the (i) mean and (ii) standard deviation of X.


Example 4.14

The lifetime risk of developing a specific disease is about 1 in 78 (1.28 percent). Suppose we randomly sample 200 people. Let X = the number of people who will develop the disease.

  1. What is the probability distribution for X?
  2. Using the formulas, calculate the (i) mean and (ii) standard deviation of X.
  3. Use your calculator to find the probability that at most eight people develop the disease.
  4. Is it more likely that five or six people will develop the disease? Justify your answer numerically.

Solution 1
  1. This is a binomial experiment since all three characteristics are met. Each person is a trial. Since we sample 200 people, the number of trials is n = 200. For each person, there are two possible outcomes: will develop the disease or not. Since we are measuring the number of people who will develop the disease, a person who will develop the disease is defined as a success and a person who will not develop the disease is defined as a failure. The risk of developing the disease is 1.28 percent. Therefore the probability of a success, p=1.28 percent, .0128, and the probability of a failure, q=1−p=1−.0128=.9872. Both p and q remain the same for each person. Therefore, X is a binomial random variable and it can be written as X~B(200,.0128).

    We can use a graphing calculator to answer Questions c and d.
    1.    
      Mean = np = 200(.0128) = 2.56
      Standard Deviation = \sqrt{npq} = \sqrt{ (200)(0.128)(.9872)} ≈1.5897
  2. Using the TI-83, 83+, 84 calculator with instructions as provided in Example 4.12:
  3. P(x ≤ 8) = binomcdf(200, .0128, 8) = .9988
  4. P(x = 5) = binompdf(200, .0128, 5) = .0707
  5. P(x = 6) = binompdf(200, .0128, 6) = .0298
  6. So P(x = 5) > P(x = 6); it is more likely that five people will develop the disease than six.


Try It 4.14

During the 2013 regular basketball season, a player had the highest field goal completion rate in the league. This player scored with 61.3 percent of his shots. Suppose you choose a random sample of 80 shots made by this player during the 2013 season. Let X = the number of shots that scored points.

  1. What is the probability distribution for X?
  2. Using the formulas, calculate the (i) mean and (ii) standard deviation of X.
  3. Use your calculator to find the probability that this player scored with 60 of these shots.
  4. Find the probability that this player scored with more than 50 of these shots.


Example 4.15

The following example illustrates a problem that is not binomial. It violates the condition of independence. ABC High School has a student advisory committee made up of 10 staff members and six students. The committee wishes to choose a chairperson and a recorder. What is the probability that the chairperson and recorder are both students? The names of all committee members are put into a box, and two names are drawn without replacement. The first name drawn determines the chairperson and the second name the recorder. There are two trials. However, the trials are not independent because the outcome of the first trial affects the outcome of the second trial. The probability of a student on the first draw is \dfrac{6}{16} because there are six students out of 16 members (10 staff members + six students). If the first draw selects a student, then the probability of a student on the second draw is \dfrac{5}{16}because there are only five students out of 15 members. If the first draw selects a staff member, then the probability of a student on the second draw is \dfrac{6}{15} because there are still six students out of 15 members. The probability of drawing a student's name changes for each of the trials and, therefore, violates the condition of independence.


Try It 4.15

A lacrosse team is selecting a captain. The names of all the seniors are put into a hat, and the first three that are drawn will be the captains. The names are not replaced once they are drawn (one person cannot be two captains). You want to see if the captains all play the same position. State whether this problem is binomial or not and state why.