Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of...

36
Statistics 303 Chapter 4 and 1.3 Probability

Transcript of Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of...

Page 1: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Statistics 303

Chapter 4 and 1.3Probability

Page 2: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Probability• The probability of an outcome is the proportion

of times the outcome would occur if we repeated the procedure many times.

• Examples– Coin: What is the probability of obtaining heads when flipping a coin?– A single die: What is the probability I will roll a four?– Two dice: What is the probability I will roll a four?– A jar of 30 red and 40 green jelly beans: What is the probability I will

randomly select a red jelly bean?– Computer: In the past 20 times I used my computer, it crashed 4 times and

didn’t crash 16 times. What is the probability my computer will crash next time I use it?

Page 3: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Probability

• Independence: Two events are independent if the outcome of one does not affect or give an indication of the outcome of the other.

Events Independent DependentFlipping a coin twice

Temperature on consecutive days

3 jelly beans: red, green, orange. Eat one. Eat another.

Page 4: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Probability• Independence: Two events are independent

if the outcome of one does not affect or give an indication of the outcome of the other.

Events Independent DependentRandomly polling two individuals

Comparing fertilizer yield for two adjacent field plots

Rolling two dice

Page 5: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Probability

• Definition: A sample space is a set of all the possible outcomes of a process.– Example: Coin

• What is the sample space for flipping a coin 3 times?

Page 6: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Probability

• Definition: An event is an outcome or set of outcomes of a process.– Example: Coin

• What is one of the possible events for flipping a coin 3 times?

Page 7: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Probability Rules

• Rule 1: The probability of any event is between 0 and 1 inclusive.– Pr(HTH) = 1/8 which is between 0 and 1.

• Rule 2: The probability of the whole sample space is 1.– Pr(rolling a 1 or 2 or 3 or 4 or 5 or 6) = 1

• Rule 3: The probability of an event not occurring is 1 minus the probability of the event. This is known as the complement rule.– Pr(not rolling a 5) = 1 – 1/6 = 5/6

Page 8: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Probability Rules• Rule 4: If two events A and B have no outcomes in

common (they are disjoint), then Pr(A or B) = Pr(A) + Pr(B)– Pr(rolling a 1 or a 6) = Pr(rolling a 1) + Pr(rolling a 6) = 1/6

+ 1/6 = 2/6 or 1/3

• Rule 5: If two events A and B are independent, then Pr(A and B) = Pr(A)Pr(B)– Pr(rolling a 1 and then a 6) = Pr(rolling a 1) * Pr(rolling a 6)

= (1/6)(1/6) = 1/36

Page 9: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Rules of Probability• Rule 1: 0 ≤ P(A) ≤ 1• Rule 2: P(S) = 1• Rule 3: Complement Rule: For any event, A,

P(Ac) = 1 – P(A)• Rule 4: Addition Rule: If A and B are disjoint

events, thenP(A or B) = P(A) + P(B)

• Rule 5: Multiplication Rule: If A and B are independent events, thenP(A and B) = P(A)P(B)

Page 10: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Random Variables

• A random variable is a variable whose value is a numerical outcome of a random phenomenon.

• A discrete random variable, X, has a finite number of possible values. The probability distribution of X lists the values and their probabilities.

Page 11: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Discrete Probability Example

X 1 2 3 4 5

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

• The table above represents the distribution of a discrete random variable, X. How likely are you to get an X more than 2?

• How likely are you to get TWO 3’s if you take a random sample of 2 from this population?

Page 12: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Discrete Probability Example X 1 2 3 4 5

P(X) 0.1 0.1 0.2 0.3 0.3

• To find the mean of a discrete distribution, multiply each possible value by its probability, then add all the products.

• To find the variance of a discrete distribution, subtract the mean from each of the X’s, square it, multiply it by the corresponding probability, then add up all the products.

Page 13: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Random Variables

• A continuous random variable, X, takes all values in an interval of numbers. The probability distribution is described by a density curve. The probability of any event is the area under the density curve and above the values of X that make up the event.

• Examples are uniform, normal, left-skewed distributions, and right-skewed distributions.

Page 14: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Uniform Distribution Example• This is a Uniform Distribution from 0 to 1. Since

the area under the curve is 1, the height is also 1. To find the probability for a given interval, you find the areas under the curve.

Page 15: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal DistributionThe mean for a normal distribution is called μ (pronounced ‘myu’), the Greek letter for m (for mean). The standard deviation for a normal distribution is called (pronounced ‘sigma’), the Greek letter for s (for std. dev.)

Page 16: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

We often write that a variable (call it X) has normal distribution with mean and variance 2 in the following way:

2,~ NX

Note that the std. dev. is still .

Page 17: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

The normal distribution we have already seen is the standard normal distribution, which has mean = 0 and standard deviation = 1 (the variance = 12 = 1). This is also called the Z-distribution.

0

1

Page 18: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

The distribution of any variable which is normally distributed can be converted to a standard normal (Z) distribution in the following way:

X

Z

This is known as a Z-score.

Page 19: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

The distribution of any variable which is normally distributed can be converted to a standard normal (Z) distribution in the following way:

2,~ NX

X

1,0~ NX

Z

0

1

Page 20: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• For the Standard Normal Distribution (or Z-Distribution) we can find probabilities associated with different values of Z using Z-tables.

Z

Page 21: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• First we look at some general characteristics of the Z-distribution.– The area under the entire curve is 1.

– The area under the curve to the left of 0 is 0.5.

– We say, “The probability that Z is to the left of 0 is 0.5.”

– This can be written as Prob ( Z < 0) = 0.5.

Z0

1

0.5

Page 22: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• We can find the probability that Z is to the left of any number using the Z-table.– Z-tables can be found at http://stat.tamu.edu/stat30x/zttables.html

– Z-tables can also be found on the inside front cover of the book

– Notice first if we go in the table to the value z = 0.00 we see the probability is 0.5.

Z0

0.5

Page 23: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution• We can find the probability that Z is to the

left of any number using the Z-table.See explanation at http://stat.tamu.edu/stat30x/notes.html called How To

Use Z Tables– Let’s look at some examples:

Pr ( Z < 1.25) = ?

Z1.25

Answer

Pr ( Z < 0.50) = ?

Z0.50

Answer

Page 24: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• More examples of probabilities to the left or less than a number

Pr ( Z < -2.01) = ? Pr ( Z < -3.75) = ?

Z-3.75

Answer

Z-2.01

Answer

Page 25: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• The Z-table only gives probabilities to the left of the value. If we want to get probabilities to the right we use 1 – Pr (Z < z).

Pr ( Z > 1.25) = ?

Z1.25

Answer:

Pr ( Z > 0.50) = ?

Z0.50

Answer:

Page 26: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• More examples of finding probabilities to the right of a number using 1 – Pr (Z < z).

Pr ( Z > -2.01) = ? Pr ( Z > -3.75) = ?

Z-3.75

Answer: >

Z-2.01

Answer:

Page 27: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• To find probabilities between two numbers,

find the less than (of to the left) probability for each number and then subtract.

Pr (-2.01< Z < 2.01) = ?

ANSWER:

Page 28: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• Now suppose we know X ~ N (, 2) and we want to know the probability that X is less than some value. We must first convert the X to a Z and then use the probabilities from the Z-table. Recall that if X ~ N (, 2) , then

1,0~ NX

Z

So Pr (X < x) = Pr (Z < (x – )/

Page 29: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• Here’s an example. Suppose X ~ N ( 3, 22). Find the probability that X is less than 4.

5.02/12

34

X

ZPr ( X < 4 ) = ?

3 4

X Z

0.500

Pr (Z < 0.5) =Pr ( X < 4 ) =

Page 30: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

The Normal Distribution

• We will look at some more difficult examples by hand:– Suppose X ~ N (2, 32),

• Given a value z, find the corresponding x that it came from.

• How many standard deviations is x from • Find Pr (X > 5).

• Find Pr (X < –4 or X > 8).

• Find Pr ( –4 < X < 8 ).

• Find the x* such that Pr ( X < x* ) = 0.8485, where 0.8485 is some probability.

Page 31: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Normal Distribution Example

• Suppose the sample proportion of 100 students who think that there is insufficient parking is normally distributed with a mean of 0.8 and a standard deviation of 0.04 ie. p ~ N(0.8, 0.042).How often would we get a sample proportion of 0.75 or less?

Page 32: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Law of Large Numbers

• Draw independent observations at random from any population with finite mean, μ. Decide how accurately you would like to estimate μ. As the number of observations drawn increases, the sample mean ( ) of the observed values eventually approaches the mean μ of the population as closely as you specified and then stays that close.

x

Page 33: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Rules for means

a bX Xa b

Rule 1: If X is a random variable and a and b are fixed numbers, then

Rule 2: If X and Y are random variables, then

X Y X Y

Page 34: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Rules for Variances

Rule 1: If X is a random variable and a and b are fixed numbers, then

2 2 2a bX Xb

Rule 2: If X and Y are independent random variables, then

2 2 2X Y X Y

Note: variances, NOT std. devs. always add. If X and Y are not independent, then there is a correlation factor added or subtracted from their sum.

Page 35: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

Variance when X and Y are Correlated

Rule 2b: If X and Y are NOT independent random variables, then

2 2 2

2 2 2

2

2

X Y X Y x y

X Y X Y x y

where is the correlation factor between X and Y.

Page 36: Statistics 303 Chapter 4 and 1.3 Probability. The probability of an outcome is the proportion of times the outcome would occur if we repeated the procedure.

General Addition Rules

• The union of any collection of events is the event that at least one of the collection occurs.

• Addition Rule for Disjoint Events – If events A, B, and C are disjoint in the sense that no two have any outcomes in common, thenP(one or more of A, B, C) = P(A)+P(B)+P(C)

• General Addition Rule for the Unions of Two Events – For any two events A and B,P(A or B) = P(A) + P(B) – P(A and B)