Top Banner
Chapter 5: Random Variables and Discrete Probability Distributions 1 http://www.landers.co.uk/statistics-cartoons/
39

Probability Theory

Feb 24, 2016

Download

Documents

Derex

Probability Theory. http://stats.stackexchange.com/questions/ 423/what-is-your-favorite-data-analysis-cartoon. Example: Independence. Are the following events independent or dependent? Winning at the Hoosier (or any other) lottery. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Probability Theory

1

Chapter 5: Random Variables and Discrete Probability Distributions

http://www.landers.co.uk/statistics-cartoons/

Page 2: Probability Theory

2

5.1-5.2: Random Variables - Goals• Be able to define what a random variable is.• Be able to differentiate between discrete and

continuous random variables.• Describe the probability distribution of a discrete

random variable.• Use the distribution and properties of a discrete

random variable to calculate the probability of an event.

Page 3: Probability Theory

3

Random Variables

A random variable is a function that assigns a unique numerical value to each outcome in a sample space.

The rule for a random variable may be given by a formula, a table, or words.

Random variables can either be discrete or continuous.

Page 4: Probability Theory

4

Probability Distribution of a Random Variables

• The probability distribution of a random variable gives all of its possible values and the probabilities for each of them.

Page 5: Probability Theory

5

Probability Distribution of a Random Variables

• Probability mass function (pmf) is the probability that a discrete random variable is equal to some specific value.

In symbols, p(x) = P(X = x)

Outcome x1 x2 …probability p1 p2 …

Page 6: Probability Theory

6

Examples: Probability Histograms

1 2 3 40

0.20.40.6

#1

Outcomes

Prob

abili

ty

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-0.2

0.2

0.6

#1

Outcomes

Prob

abili

ty

Page 7: Probability Theory

7

Examples: Probability Histograms

1 2 3 40

0.20.40.6

#2

OutcomesProb

abili

ty

0.5 1 1.5 2 2.5 3 3.5 4 4.5-0.25.55111512312578E-17

0.20.40.6 #2

Outcomes

Prob

abili

ty

Page 8: Probability Theory

8

Properties of a Valid Probability Distribution

1. 0 ≤ pi ≤ 1

Page 9: Probability Theory

9

Example: Discrete Random Variable

In a standard deck of cards, we want to know the probability of drawing a certain number of spades when we draw 3 cards with replacement. Let X be the number of spades that we draw.a) What is the distribution?b) Is this a valid distribution?c) What is the probability that you draw at least 1

spade?d) What is the probability that you draw at least 2

spades?

Page 10: Probability Theory

10

Example: Discrete (cont.)

0 1 2 3-0.1

0.1

0.3

0.5

Spades Example

Number of Spades

Prob

abili

ty

Page 11: Probability Theory

11

Example: Discrete Random Variable

In a standard deck of cards, we want to know the probability of drawing a certain number of spades when we draw 3 cards. Let X be the number of spades that we draw.a) What is the distribution?b) Is this a valid distribution?c) What is the probability that you draw at least 1

spade?d) What is the probability that you draw at least 2

spades?

Page 12: Probability Theory

12

5.3: Mean, Variance, and Standard Deviation for a Discrete Variable - Goals

• Be able to use a probability distribution to find the mean of a discrete random variable.

• Calculate means using the rules for means (not in the book)

• Be able to use a probability distribution to find the variance and standard deviation of a discrete random variable.

• Calculate variances (standard deviations) using the rules for variances for both correlated and uncorrelated random variables (not in the book)

Page 13: Probability Theory

13

Formula for the Mean of a Random Variable

Page 14: Probability Theory

14

Example: Expected value

What is the expected value of the following:a) A fair 4-sided die

X 1 2 3 4Probability 0.25 0.25 0.25 0.25

Page 15: Probability Theory

15

Rules for MeansRule 1: If X is a random variable and a and b are

fixed numbers, then:µa+bX = a + bµX

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

Rule 3: If X is a random variable and g is a function of X, then:

Page 16: Probability Theory

16

Example: Expected ValueAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

a) Verify that E(X) = 0.60. b) If the cost of insurance depends on the following

function of accidents, g(x) = 400 + (100x -15), what is the expected value of the cost of the insurance?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 17: Probability Theory

17

Example: Expected ValueFive individuals who have automobile insurance from a certain company are randomly selected. Let X and Y be two different accident profiles in this insurance company:

E(X) = 0.60

E(Y) = 0.95 c) What is the expected value the total number of accidents

of the people if 2 of them have the distribution in X and 3 have the distribution in Y?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Y 0 1 2 3pY 0.40 0.35 0.15 0.10

Page 18: Probability Theory

18

Example: Expected valueAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

d) Calculate E(X2).

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 19: Probability Theory

19

Variance of a Random Variable

= E(X2) – (E(X))2

Page 20: Probability Theory

20

Example: Variance

An individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

e) Calculate Var(X).

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 21: Probability Theory

21

Rules for VarianceRule 1: If X is a random variable and a and b are

fixed numbers, then:σ2

a+bX = b2σ2X

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

σ2XY = σ2

X + σ2Y

Rule 3: If X and Y have correlation ρ, then:σ2

XY = σ2X + σ2

Y 2ρσXσY

Page 22: Probability Theory

22

Example: VarianceAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

a) Calculate the variance of this distribution. b) If the cost of insurance depends on the following

function of accidents, g(x) = 400 + (100x -15), what is the standard deviation of the cost of the insurance?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 23: Probability Theory

23

Example: Variance5 individuals who have automobile insurance from a certain company are randomly selected. Let X and Y be two different independent accident profiles in this insurance company:

Var(X) = 0.74

Var(Y) = 0.95 What is the standard deviation of the (2X – 3Y)?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Y 0 1 2 3pY 0.40 0.35 0.15 0.10

Page 24: Probability Theory

24

5.4/5.5: Binomial and Poisson Distributions - Goals

• Determine when the random variable X can be modeled using the binomial or Poisson Distributions.

• Calculate the probability, mean and standard deviation when X has a binomial or Poisson distribution.

Page 25: Probability Theory

25

Properties of a Binomial Experiment - BInS

• Binary: There are only two possible outcomes for each trial.

• Independent: The outcomes of the trials are independent.

• n: The experiment consists of n identical trials where n is fixed..

• Success: For each trial, the probability p of success must be the same.

Page 26: Probability Theory

26

Binomial Setting: ExampleDo the following use the Binomial Setting?

1. Rolling a fair 4-sided die five times and observing whether the number showing is a 1 or not

2. In a drug trial, 20 patients with the same condition are given a drug and some are given a placebo to see if the drug is effective or not.

3. In quality control we want to see if a particular product is ‘not acceptable’. We take 20 random samples from an assembly line that uses different machines to produce the product.

Page 27: Probability Theory

27

Binomial Distribution

The binomial random variable maps each outcome in a binomial experiment to a real number, and is defined to be the number of successes in n trials.

• X ~ B(n,p)

Page 28: Probability Theory

28

Examples of Binomial Distribution

1. In a clinical trial, a patient’s condition may improve or not. We study the number of patients who improved.

2. Was a sales transaction considered pleasant? The binomial distribution describes the number of pleasant transactions.

3. In quality control we assess the number of defective items in a lot of goods.

Page 29: Probability Theory

29

Binomial Probabilities

Suppose X is a binomial random variable with n trials and probability of a success p. Then

Page 30: Probability Theory

30

Example: Binomial DistributionSuppose 20% of all copies of a particular

textbook fail a certain binding strength test. Let's check a batch of 15 such textbooks.

a) Is this a binomial distribution?b) What is the chance that there are no

defective textbooks?c) What is the chance that we get less than 3

defective textbooks?d) What is the chance that we get more than 2

defective textbooks?

Page 31: Probability Theory

31

Example: Binomial Distribution (cont)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 150

0.05

0.1

0.15

0.2

0.25

0.3

# of defective textbooks

Prop

ortio

n

n=15p=0.2

Page 32: Probability Theory

32

Histograms of Binomial Distributions

0

0.05

0.1

0.15

0.2

0.25

0.3

0 1 2 3 4 5 6 7 8 9 10

Number of successes

P(X

=x)

0

0.05

0.1

0.15

0.2

0.25

0.3

0 1 2 3 4 5 6 7 8 9 10

Number of successes

P(X=

x)

0

0.05

0.1

0.15

0.2

0.25

0.3

0 1 2 3 4 5 6 7 8 9 10

Number of successes

P(X=

x)

n = 10p = 0.75

n = 10p = 0.5n = 10

p = 0.25

Page 33: Probability Theory

33

Cumulative Probabilities (CDF)

The Cumulative Probability Function is defined as the following probability: P(X ≤ x).

Page 34: Probability Theory

34

Binomial Distribution: Mean and Standard Deviation

If X ~ B(n,p) thenE(X) = X = np

Page 35: Probability Theory

35

Example: Binomial Distribution (cont)

Suppose 20% of all copies of a particular textbook fail a certain binding strength test. Let's check a batch of 15 such textbooks.

e) What are the mean and standard deviation of the number of textbooks that will fail the binding test?

Page 36: Probability Theory

36

Poisson Random Variable• The Poisson random variable is a count of the

number of times the specific event occurs during a given interval.

• Example:– The number of people who enter the Union

from noon to 1 pm.– The number of α-particles emitted from

Uranium-238 in 1 minute.– The number of DNA fragments found from a

sequencing experiment.– The number of dead trees in a square mile of

forest.

Page 37: Probability Theory

37

Poisson Experiment

1. The probability that a particular event will occur in a given interval (of time, length, volume, etc.) is the same for all units of equal size and is proportional to the size of the unit.

2. The number of events that occur in any interval is independent of the number that occur in any other non-overlapping interval.

3. The probability that more than one event occurs in a unit of measure is negligible for very small-sized units.

Page 38: Probability Theory

38

Poisson Distribution

X = 2 =

Page 39: Probability Theory

39

Example: Poisson Distribution

An IT consultant receives an average of 3 calls per hour. Let X be the number of calls the consultant receives. Assume X follows a Poisson distribution.

a) What is the chance that the consultant receives exactly one call during the next hour?

b) What is the chance that the consultant receives more than one call during the next hour?

c) What is the chance that the consultant receives exactly 5 calls during the next two hours?