Transcript
Page 1: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics

Assignment:

Chapter 5 is pretty good, so I’ll be following the text pretty closely. The book likes to talk about the mean of a

random variable, I tend to call it the expected value of the random variable or the expectation of X, written as E(X).

I will not ask you to compute the variance or standard deviation of a random variable, so you don’t have to do those

parts of the homework from sections 5.2 and 5.3. Before you can do section 5.3 you’ll need to understand how to

do combinations and factorials as I show you below.

Do the following exercises: 5.1: 6, 7, 9, 11, 13, 15, 17, 19, 23

5.2: 7, 9, 11, 13, 15, 19

5.3: 1-13 odd, 14, 17

There is also a set of problems below that you should do before section 5.3.

In the following sections, we discuss random variables, expectation and variance of random variables, combinations

and factorials, and the infamous binomial distribution.

______________________________

5.0 Random variable

Definition 5.0.0 A random variable is a variable whose numerical value is given by chance. There are also

random elements which are what we call a random variable that assumes values that are not numerical.

Examples of random variables are assigning X to a number rolled on a die, and Y = the blood pressure of an

American. A random element might be given as Z = gender of a person.

We will not go into the detail of the mathematics underlying this single definition here (it is vast and rich), but know

that a random variable is much more than just a capital letter theoretically representing a number.

There are two types of random variables.

A discrete random variable can assume only a countable number of distinct values. If a random variable can only

be a finite number of distinct values, then it must be discrete. Examples of discrete random variables include the

number of spoons in a kitchen, number in attendance at a basketball game, the number of times you need to shoot

a basketball from the foul line until you make 3 baskets in a row, etc. A more complicated example is a person’s

height in centimeters, rounded to the nearest tenth.

A continuous random variable is one that assumes values from a range. They require some different handling

when it comes to probability. Height of a person is a continuous random variable. Consider that when we say

somebody is 5' 2", that is only an approximation. It is not an exact measurement. In fact, the probability that

someone is exactly 5' 2" is zero. The questions we ask about continuous random variables involve ranges or

intervals. For example, what is the probability that if you choose a person at random, they will be between 4' 10"

and 5' 6" tall? Or, what is the probability that if you choose a person at random, they are at least 5' 2" tall?

When we speak about distributions, we are referring to the probability of a random variable being equal to a value,

in the discrete case, or about it being within a given range, in the continuous case. When we make histograms of

data, what we are actually trying to see is the distribution of the random variable. This is another topic where I could

literally type for months about, however I think this is sufficient for this class.

Page 2: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

In discrete random variables, the distribution is referring to the probabilities of

each possible value of the random variable.

In a continuous random variable, probability is represented by area. The total area

under the distribution curve is 100%. So in the example to the left, I would find the

probability of a car lasting between 10 and 20 years by finding the area under the

curve between 10 and 20. (Looks something like about 70% to my eyes.)

Definition 5.0.1 The expected value of a random variable is the weighted average of all possible values that the

variable can take on.

The expected value of a random variable is actually what I called a simple weighted mean earlier where the weights

are probabilities. You can think of expected value like this: If you repeat an experiment many, many, many times

and take the average of all the sample means, you are approximating the expected value of the random variable

associated with the experiment. To get the actual expected value, we repeat the experiment an infinite number of

times. So, the expected value of a random variable is a theoretical object, since we can’t really repeat the

experiment an infinite number of times.

Imagine a box with only two numbers in it: 0 and 1. Assuming an equally-likely experiment, we “expect” to see,

in 100 draws, exactly 50 0's and 50 1's. If we take the average of these 100 draws you get 0.5. This is the expected

value for this experiment. Modifying it just a little, imagine that the box instead contains three 0's and and one 1.

From 100 draws you would “expect” to see 75 0's and 25 1's. The expected value for this experiment is 0.25. This

isn’t a truly useful way to compute expectation, but it might help in understanding what it means.

Here is the formula for expected value of a discrete random variable X.

Equation 5.0.0

Remember that Σ means “add up.” So, to find expected value, we multiply each possible value of the random

variable by the probability that it actually is that variable, and then add them all up. Equation 4.1.0 is written in very

general notation. If we have a finite discrete random variable, i.e., X can only take on a finite number of values, we

can write the expected value as follows (assuming X can be the values 1, 2, 3, ..., n ).

Equation 5.0.1

Let’s do a simple example.

________________________________

Example 5.0.0

Page 3: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

Your experiment is rolling a die: S = {1,2,3,4,5,6}. Assign X to the number rolled. So X can take on any of the

values in S, i.e., X can be 1, 2, 3, 4, 5, or 6. Moreover, we have

P(X=1) = P(X=2 ) = P(X=3) = P(X=4 ) = P(X=5) = P(X=6) = 1/6.

So, using Equation 4.1.1, we have

So, when the experiment is rolling a die, and X is the random variable assigned to the number rolled, then we have

E(X) = 3.5.

________________________________

Notice that the expected value of the random variable in Example 5.0.0 is not a value in the sample space of the

random variable, which is often the case. Now let’s do a more complicated example.

________________________________

Example 5.0.1

Recall Example 4.1.5. The experiment is rolling two dice at the same time. Let X be the sum of the roll. The

sample space of X is given below in the shaded area. Find E(X).

1 2 3 4 5 6

1 2 3 4 5 6 7

2 3 4 5 6 7 8

3 4 5 6 7 8 9

4 5 6 7 8 9 10

5 6 7 8 9 10 11

6 7 8 9 10 11 12

Let’s think about this. The random variable X takes on the value 2 with probability 1/36. It takes on the value 3

with probability 2/36. Continuing in this way, we see that

Page 4: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

So, when the experiment is rolling two die, and X is the random variable

assigned to the sum of the numbers rolled, then we have

E(X) = 7.

________________________________

Thus far, we have worked with only positive random variables, but random variables can be assigned negative

values. Consider the following example.

________________________________

Example 5.0.2

A box contains a total of 10 tickets. One ticket has 10 written on it, two tickets have 8 written on them, one ticket

has 5 written on it, three tickets have -1 written on them, and the rest have 0 written on them. One ticket is drawn

from the box and the random variable X is assigned the value written on the ticket.

Assuming the draw is equally likely, write the distribution table for X. What is the expected value of X?

Although we haven’t discussed distribution tables explicitly in these notes, they are really easy to write (check your

book for details). A distribution table is simply a table of all possible values of X and the associated probabilities.

This particular distribution table can be written as follows.

X -1 0 5 8 10

P(X) .3 .3 .1 .2 .1

Now it’s easy to find our expectation, just use the table.

________________________________

Now let’s look at the concept of variance. (This will not be tested.) Recall that variance is a measure of dispersion,

i.e., it gives us information on the spread of the data. Variance of a random variable is formally defined via the

expectation of a random variable, so again, we are working with a theoretical object.

Page 5: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

Definition 5.0.2 The variance of a random variable is the expected value of the squared deviation of the random

variable from its mean.

What does this mean? Well, subtract E(X) from X, square this difference, and then find the expected value of this

new random variable. Here’s the formula:

Equation 5.0.2 .

To get a simpler version of this formula, we need to know that expectation is a linear operator. I don’t expect you

to know what this means, but understand it’s the reason that expectation of a sum is the sum of the expectations,

so we can write equation 4.1.2 as

Equation 5.0.3 .

In general, E(X 2) is not always an easy thing to find. Sometimes it’s very complicated. But, for our simple

experiment of rolling a die, it works just as you expect it should (since the squaring function on S is one-to-one for

this experiment).

________________________________

Example 5.0.3

Your experiment is rolling a die: S = {1,2,3,4,5,6}. Assign X to the number rolled. So X 2 can take on the values

1, 4, 9, 16, 25, and 36, and each of these have a probability of 1/6 (why?). So, using Equation 4.1.3, we get

Now let’s use Equation 4.1.2:

Of course, we get the same thing because they are the same equation.

Page 6: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

________________________________

Although we won’t do too much with variance here, I want to take a page or so to try and tie some things together

at this point. I will try to state relationships as simply as I can.

Recall we began our course with discussions of samples versus populations. Parameters are values that describe

populations, and statistics are values that describe samples. Now think of X as some random variable of interest

relating to our population under study. Both E(X) and V(X) are parameters of the probability distribution of the

random variable X. The parameter E(X) is the true mean of the random variable X with respect to the population,

and the parameter V(X) is the true variance of the random variable X with respect to the population, i.e., we can

think:

E(X) = μ And V(X) = σ 2 .

These are usually what we are trying to estimate when we take a sample and calculate the sample mean and sample

variance, respectively (both of which are statistics). Let me repeat this another way:

is an estimator of E(X) and s2 = is an estimator of V(X).

Moreover, these estimators are what we call unbiased estimators. We’ve mentioned this before but now we can

make it precise.

Definition 5.0.3 The bias of an estimator is the expected value of the deviation of the estimator from the parameter

it is estimating.

This means if θ is a parameter of interest, and is an estimator of θ, then we have

Equation 5.0.4 Bias( ) = E( - θ) = E( ) - θ .

An estimator is said to be unbiased if Bias( ) = 0, which means we must have E( ) = θ. For the sample mean,

we have

E( ) = E(X) = μ

and for the sample variance, we have

E(s2) = V(X) = σ 2.

We won’t prove the unbiasedness of the sample mean and sample variance here, but know that this particular

property of these two estimators is very useful and nice. You will not be tested on Definition 5.0.3 and Equation

5.0.4.

______________________________

5.1 Factorials and Combinations

Factorials are really not too bad. They are defined only for the natural numbers; recall the natural numbers are 0,

Page 7: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

1, 2, 3, 4, ..., etc., i.e., the counting numbers. We’ll start with some examples, and I’m sure you’ll get it.

________________________________

Example 5.1.0

5! = 5*4*3*2*1 = 120

4! = 4*3*2*1 = 24

3! = 3*2*1 = 6

2! = 2*1 = 2

________________________________

In general, we write

n! = n*(n-1)*(n-2)* . . .* 3 * 2 *1.

There are some special factorials to remember, namely 1! and 0!.

1! = 1

and. . .

0!= 1.

I can give you many reasons why 1!= 0!= 1, but for this class, it feels clumsy. We’ll just take it as a definition

because it makes everything work correctly.

Definition 5.1.0 0!= 1

A couple of more properties of factorials before we get to combinations:

Factorials are not distributive operators. That is, (5-3)! must be computed as (5-3)! = (2)! = 2! = 2. It is crucial that

you know (5-3)! ����5! - 3!. Just do the work inside the parenthesis first (anyone remember PEMDAS?).

Also, know that 4!*3! ���� 12!. You must first compute each factorial, and then multiply the resulting numbers (or

just expand them all out and multiply).

Last but not least, we don’t define factorials for negative numbers.

Now on to combinations. Suppose we have n objects, and we want to choose r of them, where r � n.

Definition 5.1.1 A combination is the number of distinct ways we can choose r objects from n objects.

There are many uses and places in mathematics for combinations, but I will not burden you with them here. (It’s

killing me to not start ranting about them!) We need to merely be able to compute them in order to study the

binomial distribution.

Page 8: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

There are two commonly used symbols for combinations. We will follow the book (this material is near the end

of Chapter 4) and use n C r , which is read “the combination of n items taken r at a time.” Thus 5 C 3 is read “the

combination of 5 items taken 3 at a time.” It is the number of different ways we can choose distinct sets of 3

objects from a set of 5 objects. The other commonly used symbol is , which is usually read as “n choose r.”

Here is the formula:

Equation 5.1.0 n C r = .

It is interesting to note that Combinatorics, essentially the study of counting, comprises an entire field of math all

on its own. It is a vast and complex field of math; counting is hard stuff. But it’s cool, nonetheless.

________________________________

Example 5.1.1

Suppose our set of 5 items is {a, b, c, d, e}. We want to know the number of different ways we can pick a set of

three letters from this. We could brute-force our way through it and list them all out (recall that

{a,b,c}={c,a,b}={b,c,a}, etc.):

{a, b, c}, {a, b, d}, {a, b, e}, {a, c, d}, {a, c, e},

{b, c, e}, {b, d, e}, {b, c, d}, {a, d, e}, {c, d, e},

and I think that’s it. So there are 10 distinct sets of 3 that we could choose. Clearly this method is completely

inefficient (it took me a few minutes to list all of these, and a few more to make sure that it’s a complete list). Use

the formula instead:

5 C3 = .

________________________________

________________________________

Example 5.1.2

If you need to, write out the entire factorial before you do any cancellation, but here’s what I see:

11C7 = .

________________________________

Try these exercises out. (Answers are below.)

1. 4C1 2. 7C0 3. 8C3 4. 9C3 5. 12C8

6. 4C3 7. 7C7 8. 8C5 9. 9C6 10. 12C4

Page 9: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

We now move on to the very important topic of binomial probability.

______________________________

5.2 Binomial Probability

There are many, many probability distributions that we will not study (most of them). We study the binomial

probability distribution at this level simply because it is easy to understand and it has tons of applications. It’s one

of the more famous discrete probability distributions.

Definition 5.2.0 A binomial experiment is an experiment with a fixed number of independent trials, where each

outcome falls into exactly one of two categories.

The two categories are usually called ‘success’ and ‘failure’. Some examples are experiments where the outcomes

are right or wrong, yes or no, defective or not defective, win or lose, boy or girl, eyes are blue or eyes are not blue,

etc. Whatever we are counting is the ‘success.’ For example, if you are running an experiment where the outcomes

are right or wrong, e.g., a multiple choice test, and you are finding, say, the probability that you get 10 out of 20

questions right if you randomly guess, then the ‘success’ is right and the ‘failure’ is wrong. If instead you were

finding the probability that you get 5 out of 20 wrong if you randomly guess, the ‘success’ is wrong and the ‘failure’

is right. So, be conscientious of the categories when doing calculations.

By a fixed number of independent trials, we mean that our experiment actually consists of an experiment, called a

trial, repeated a fixed number of times, and each trial is independent of every other. For example, rolling a die 10

times (each roll is a trial), taking a 20 question multiple choice test via random guessing (each question is a trial),

recording whether or not the students in your online class have blue eyes (each student is a trial), etc.

Definition 5.2.1 A binomial random variable counts the number of successes in a binomial experiment.

Let X = the number of successes in an experiment. Then X is a binomial random variable if the following 3

requirements are met

1. The experiment has a finite number of trials. Actually, when the number of trials goes to infinity, the

binomial random variable becomes a normal random variable, which we discuss in the next chapter.

2. Each trial is independent of every other trial. The previous statement holds deep mathematical meaning,

but much of it is beyond the scope of this course. I suggest you review the concept of independence from

the probability section. We use it profusely here.

3. The probability of success plus the probability of failure is 1, i.e.,

P(success) + P(failure) = 1.

Definition 5.2.2 A binomial probability distribution is the probability distribution of a binomial random variable.

For a probability distribution to be a binomial probability distribution, the following 4 requirements must be met:

1. There must be a fixed number of trials. By this, we mean that the number of trials must be some fixed

constant, it can not itself be a random variable. We do study such distributions, but they are not necessarily

binomial.

Page 10: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

2. Trials are independent.

3. All outcomes are classified into two categories, ‘success’ and ‘failure.’

4. Probabilities remain constant for each trial. This means that the probability of success must be the same

for each and every trial and likewise with the probability of failure.

Before we go any further, we need some notation.

We use n to denote the number of trials (remember this is fixed).

S and F denote success and failure, the two possible categories of all outcomes.

The probability of success in one of n trials is p, i.e., P(S) = p.

The probability of failure in one of n trials is q, i.e., P(F) = q.

We use x to denote the specific number of successes in n trials, .

Finally, P(X = x) = the probability of getting exactly x successes among the n trials.

There are a couple of things I’d like to mention with regards to the notation. First, it would benefit you to think of

n, the number of trials, as synonymous with sample size. Secondly, x, the specific number of successes in n trials,

is what we call the realization of X, our binomial random variable. Your book is just simply wrong in writing P(X)

in this context.

Now I think we are ready for the binomial (probability) formula:

Equation 5.2.0

I’m sure many of you have seen this formula before when studying binomial expansion. Let’s disassemble this

formula via an example.

________________________________

Example 5.2.0

Consider a 4 question multiple choice quiz. Each question has 5 options. You know nothing of the content, and

so you answer each question by randomly guessing.

Let p = probability of guessing correctly

q = probability of guessing incorrectly.

What’s the probability of getting exactly 3 correct?

First, let’s digest this problem. We are looking for the probability of getting exactly

3 correct, so our success category is correct and our failure category is incorrect.

Each question has 5 options, so we have

P(S) = p = 1/5 and P(F) = q = 4/5.

Well, one way we can get exactly 3 correct is by getting the first three questions correct and the last question

incorrect. Since the trials are independent (via assumption) we can multiply the probabilities! (Review the concept

Page 11: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

of independence if you haven’t already.) Think of it like this:

P(1st correct and 2nd correct and 3rd correct and 4th incorrect)

=P(1st correct)P(2nd correct)P(3rd correct)P(4th incorrect).

And this holds because the trials are independent. Now, using some of our notation, it looks like this

P({S, S, S, F}) = P(S)*P(S)*P(S)*P(F) = pppq = .

So, the probability of getting the first three correct and the last incorrect is 0.0064. Are we done? No! This is only

one way of getting exactly 3 correct. Remember that for the total probability, we must add the probabilities of all

the outcomes that satisfy the event. Let’s list all the outcomes that satisfy the event exactly 3 correct. All outcomes

that satisfy our event are:

{S, S, S, F}, {S, F, S, S}, {F, S, S, S}, and {S, S, F, S}.

So, there are four outcomes that satisfy the event exactly three correct. You should be reminded of combinations

at this point, i.e., we just found 4C3.

What is the probability of each of the events above? Well, we already know

P({S, S, S, F}) = 0.0064.

Let’s investigate the others:

P({S, F, S, S}) = ,

P({F, S, S, S}) = , and

P({S, S, F, S}) = .

The above results should not be surprising since the trials are independent and multiplication is commutative.

We are now ready to answer the question:

P(exactly 3 correct) = 0.0064+0.0064+0.0064+0.0064 = 4*0.0064 = 0.0256.

Now let’s use Equation 5.2.0 to get this result. We have the following:

n = 4, p = 1/5, q = 4/5, and x = 3.

So, we plug all these values into the formulas to get

Page 12: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

= 4*0.0064 = 0.0256.

This is exactly the result we got by tearing the problem apart.

________________________________

Hopefully, the previous example gives you some intuitive feel for Equation 5.2.0. Now let’s look at the same set

up, but with different questions.

________________________________

Example 5.2.1

We use the set up of Example 5.2.0. Answer the following questions.

1. What’s the probability of getting at least 3 correct?

2. What’s the probability of getting no more than 3 correct?

3. What’s the probability of getting less than 3 correct?

4. What’s the probability of getting more than 3 correct?

5. What’s the probability of getting at most 3 correct?

6. What’s the probability of getting exactly 3 incorrect?

7. What’s the probability of getting exactly 1 correct?

1. We need to find the probability of getting at least 3 correct. At least 3 correct means we get either exactly 3

correct or exactly 4 correct. Notice that exactly 3 correct and exactly 4 correct are mutually exclusive events (review

this!). So, we have

P(exactly 3 correct or exactly 4 correct) = P(exactly 3 correct) + P(exactly 4 correct) = P(3)+P(4).

So, using Equation 5.2.0, we get

= 0.0256 + 0.0016 = 0.0272.

So, if you’re guessing on this quiz, you have a 2.72% chance of actually passing.

2. We need to find the probability of getting no more than 3 correct. No more than 3 correct means we get either

0, 1, 2, or 3 correct. So, we could find P(X = 0)+P(X = 1)+P(X = 2)+P(X = 3). But, hopefully you see that it’s easier

to compute using the complement here. This is how it goes:

P(no more than 3 correct) = P(X = 0)+P(X = 1)+P(X = 2)+P(X = 3),

so using basic algebra and properties of probability, we get

Page 13: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

1-P(no more than 3 correct) = 1-(P(X = 0)+P(X = 1)+P(X = 2)+P(X = 3)) = P(X = 4).

Using basic algebra again, we get

P(no more than 3 correct) = 1- P(X = 4).

We already know from 1. that P(X = 4) = 0.0016. So, P(no more than 3 correct) = 0.9984. You should verify that

P(X = 0)+P(X = 1)+P(X = 2)+P(X = 3) = 0.9984.

3. We need to find the probability of getting less than 3 correct. Less than 3 correct means we get 0, 1, or 2 correct.

Now, we could find P(X = 0)+P(X = 1)+P(X = 2) and this is the answer. But, notice that less than 3 correct is the

complement of the event at least 3 correct, which is the event we worked with in 1. Since we’ve already calculated

the probability of this, let’s use the complement again. Here’s how it goes:

P(less than 3 correct) = 1-P(at least 3 correct) = 1 - 0.0272 = 0.9728.

4. We need to find the probability of getting more than 3 correct. More than 3 correct means we get 4 correct. We

already know P(X = 4) = 0.0016.

5. We need to find the probability of getting at most 3 correct. At most 3 correct is the same as no more than 3

correct. We calculated this in 2. So, P(at most 3 correct) = 0.9984.

6. We need to find the probability of getting exactly 3 incorrect. We now consider incorrect as our success and

correct as our failure. Using Equation 5.2.0, we get

= 4*0.1024 = 0.4096.

7. We need to find the probability of getting exactly 1 correct. Exactly 1 correct means we get exactly 3 incorrect,

so this is the same event as in 6. So,

P(exactly 1 correct) = 0.4096.

________________________________

Let’s look at what we just did via tools we already have. Let X count the number of correct answers on our 4

question multiple choice quiz. Then the probability distribution table of X is as follows:

X 0 1 2 3 4

P(X) 0.4096 0.4096 0.1536 0.0256 0.0016.

Here’s a picture of this distribution table:

Page 14: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

Notice that we can get all the probabilities we just calculated from the distribution table. For example,

P(no more than 3 correct) = P(X � 3) = P(X = 0)+P(X = 1)+P(X = 2)+P(X = 3)

= 0.4096+0.4096+0.1536+0.0256 = 0.9984.

Now let X count the number of incorrect answers on our 4 question multiple choice quiz. Then the probability

distribution table of X is as follows:

X 0 1 2 3 4

P(X) 0.0016 0.0256 0.1536 0.4096 0.4096.

Here’s a picture of this distribution table:

Note again the importance clarifying the success and failure categories. It is also interesting to note the symmetry

of these two distributions.

Page 15: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

Now let’s discuss the expected value of a binomial random variable. Let X be a binomial random variable. Then

we have

Equation 5.2.1 E(X) = np.

Let’s check that this actually works before discussing it further. Let X count the number of correct answers on our

4 question multiple choice quiz. Using the probability distribution table, we get

E(X) = 0*0.4096+1*0.4096+2*0.1536+3*0.0256+4*0.0016 = 0.8.

Now let X count the number of incorrect answers on our 4 question multiple choice quiz. Using the probability

distribution table for this random variable, we get

E(X) = 0*0.0016+1*0.0256+2*0.1536+3*0.4096+4*0.4096 = 3.2.

Equation 5.2.1 certainly holds for the two different random variables described. Let’s see if we can figure out why

this formula works. Recall that if X is a finite discrete random variable that assumes the values 1, 2, ..., n, then we

define the expected value of X to be

.

Binomial random variables count the number of successes in n trials, i.e., they are finite discrete random variables

that assume the values 0, 1, 2, 3, ..., n, where n is the number of trials. So, if X is a binomial random variable, then

.

The second summation is the same as the first because when k = 0, the term is 0. If you’ve got Calc II under your

belt, this is fairly simple to prove. However, for this class, we can just use intuition: the expected value of the

number of successes is the number of chances we have to get a success times the probability that we get a success.

________________________________

Example 5.2.2

The experiment is to roll a die 5 times. Let X = number of threes that are rolled. Answer the following questions.

1. Is X a binomial random variable?

2. Find the probability of tossing 4 threes.

3. Find the probability of tossing at least 2 threes.

4. What is E(X)?

1. Yes, X is a binomial random variable. The success is that we roll a 3 and the failure is that we do not roll a 3.

2. We must find the probability of tossing 4 threes. Let’s get everything we need:

n = 5, p = 1/6, q = 5/6, and x = 4.

So, we have

Page 16: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

= 5*5/7776 � 0.0032.

3. We must find the probability of tossing at least 2 threes. So, we are looking for P(X � 2). Again, let’s gather

everything we need:

n = 5, p = 1/6, q = 5/6, and x = 2, 3, 4, and 5.

Hopefully, you notice finding the complement is easier here, i.e., instead of calculating

P(X � 2) = P(X = 2)+P(X = 3)+P(X = 4)+P(X = 5),

we calculate

P(X � 2) = 1-(P(X = 0)+P(X = 1)) = 1 -

= 1 - 3125/7776 - 5*625/7776 � 0.1963.

4. Now we calculate the expected value of X. We know from Equation 5.2.1 that

E(X) = 5*1/6 = 5/6.

Let’s just write out the probability distribution table and check this the old-fashioned way.

X 0 1 2 3 4 5

P(X)

Using the probability distribution table, we get

E(X) = 0* +1* +2* +3* +4* +5*

=

________________________________

Let’s do more examples.

________________________________

Example 5.2.3

Page 17: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

(This is a homework problem from Exercises 5-3.)

11. R.H. Bruskin Associates Market Research found that 40% of Americans do not think that having a college

education is important to succeed in the business world. If a random sample of five Americans is selected, find

these probabilities:

a. Exactly 2 people will agree with that statement.

Let’s get all our English and our numbers straight, first. Since we are considering the probability that people agree

with the statement above, a success will be selecting an American who does not think that having a college

education is important to succeed in the business world. So, p = 0.4. Thus, the probability that someone does not

agree with the statement is q = 0.6. And of course, n = 5. Now, we’re ready to solve the problem. We have n =

5, p = 0.4, q = 0.6, and x = 2. We seek the probability of exactly two successes, i.e., selecting exactly 2 people

who agree with the given statement. So, we have:

P(X=2) = 5 C 2 (0.4)2(0.6)3 = (0.16)*(0.216) = 10*0.03456 = 0.3456

b. At most 3 people will agree with that statement.

We seek the probability of at most 3 successes, i.e., selecting 0, 1, 2, or 3 (but no more than) people who agree with

the given statement. So, X� 3 and P(X� 3) = P(X = 0)+P(X = 1)+P(X = 2)+P(X = 3). You can attack this a couple

of different ways. You can find each of these probabilities and add them all up, or you can find the probability of

the complement and subtract that from 1. The complement of X � 3 is X � 4 and

P(X � 4) = P(X = 4)+P(X = 5).

I’ll do it both ways (remember we have P(X=2) above):

P(X=0) = 5 C 0 (0.4)0(0.6)5 = (1)*(0.07776) = 0.07776

P(X=1) = 5 C 1 (0.4)1(0.6)4 = (0.4)*(0.1296) = 5*0.05184 = 0.2592

P(X=3) = 5 C 3 (0.4)3(0.6)2 = (0.064)*(0.36) = 10*0.02304 = 0.2304

Add all these and we get P(X � 3) = 0.07776 + 0.2592 +0.3456 + 0.2304 = 0.91296.

Now try using the complement.

P(X=4) = 5 C 4 (0.4)4(0.6)1 = (0.0256)*(0.6) = 5*0.01536 = 0.0768

P(X=5) = 5 C 5 (0.4)5(0.6)0 = (0.01024) = 0.01024

Add these and subtract from 1: P(X � 3) = 1- (0.0768 + 0.01024) = 1- 0.08704 = 0.91296.

Page 18: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

c. At least 2 people will agree with that statement.

Since we have all the numbers listed in the first two parts of the problem, we just need to sort out the English

and add the correct ones. At least 2 people means 2 or more people, so the probability we seek is

P(X � 2) = P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5)

= 0.3456 + 0.2304 + 0.0768 + 0.01024

= 0.66304.

Alternatively, we could use the complement and we get

P(X � 2) = 1 - P(X � 1) = 1 - (P(X = 0)+P(X = 1))

= 1 - (0.07776 +0.2592)

= 0.66304.

d. Fewer than 3 people will agree with that statement.

Fewer than 3 people means strictly less than 3 (it can not be 3), so we’re looking for

P(X � 2) = P(X = 0)+P(X = 1)+P(X = 2)

= 0.07776 + 0.2592 +0.3456

= 0.68256.

Try it with the complement!

________________________________

The following example is a bit more complicated and you will not be expected to calculate anything this

complicated, but it’s interesting to see anyway.

________________________________

Example 5.2.4

In regards to Plain M&M’s Chocolate Candies, Mars, Inc. reports that the proportion of

green candies is 10%. Suppose you have a bag of 50 M&M’s, (you may assume the

M&M’s in the bag were chosen at random from those produced). Source: M&M’s

website: http://www.mmmars.com/cai/mms/faq.html, October, 2003.

a) What is the expected number of greens?

So, X counts the number of green M&M’s in the sample of 50 that were randomly chosen from those produced. The

probability that we get a green when randomly choosing from those produced is 10%. So, since n = 50, we have

E(X) = 50*0.10 = 5.

b) What are the chances you will have exactly 8 greens?

Gather everything you need: n = 50, p = 0.1, q = 0.9, and x = 8. Using Equation 5.2.0, we get

Page 19: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

� 0.0643

c) What are the chances you will have at least 8 greens?

� 1 - 0.8779 = 0.1221.

d) What is the probability you will have between 4 and 8 greens, inclusive?

We already know P(X � 8) � 0.1221. So we only need to find

= P(X = 0)+P(X = 1)+P(X = 2)+P(X = 3)

� 0.2503.

And so, we get

� 1 - 0.1221 - 0.2503 = 0.6276.

________________________________

Note that most graphing calculators will do combinations for you. You can look up instructions for your specific graphing

calculator if you have one and if not, use this link:

http://www.calculatorsoup.com/calculators/discretemathematics/combinations.php

Page 20: Chapter 5 Notes and elaborations for Math 1125 ...faculty.mansfield.edu/mhaner/OnlineStats/Chapter5.pdf · Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics Assignment:

Answers to combination problems: 1. 4 2. 1 3. 56 4. 84 5. 495

6. 4 7. 1 8. 56 9. 84 10. 495


Top Related