Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete...

33
Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions

Transcript of Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete...

Page 1: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Statistics Lecture Notes

Dr. Halil İbrahim CEBECİ

Chapter 06Random Variables and

Discrete Probability Distributions

Page 2: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Random Variable Represents a possible numerical value from a random

event Takes on different values based on chance

Random Variable

Statistics Lecture Notes – Chapter 06

Random Variables

Discrete Random Variable

Continuous Random Variable

Page 3: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Discrete Random VariableA discrete random variable is a variable that can assume only a countable number of values

Many possible outcomes: number of complaints per day number of TV’s in a household number of rings before the phone is answered

Only two possible outcomes: gender: male or female defective: yes or no spreads peanut butter first vs. spreads jelly first

Discrete Random Variable

Statistics Lecture Notes – Chapter 06

Page 4: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Continuous Random VariableA continuous random variable is a variable that can assume any value on a continuum (can assume an uncountable number of values)

thickness of an item time required to complete a task temperature of a solution height, in inches

These can potentially take on any value, depending only on the ability to measure accurately.

Continuous Random Variable

Statistics Lecture Notes – Chapter 06

Page 5: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Discrete Probability Distributions

Statistics Lecture Notes – Chapter 06

Experiment: Toss 2 Coins. Let x = # heads.

T

T

4 possible outcomes

T

T

H

H

H H

Probability Distribution

0 1 2 x

x Value Probability

0 1/4 = .25

1 2/4 = .50

2 1/4 = .25

.50

.25

Pro

bab

ilit

y

Page 6: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Discrete Probability Distributions

Statistics Lecture Notes – Chapter 06

A list of all possible [ ] pairs

i = Value of Random Variable (Outcome)

= Probability Associated with Value ’s are mutually exclusive

(no overlap) ’s are collectively exhaustive

(nothing left out)

for each

Page 7: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Expected Value

Statistics Lecture Notes – Chapter 06

Expected Value of a discrete distribution = Mean (Weighted Average)

Ex6.1 - Toss 2 coins, = # of heads, compute expected value of

Page 8: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Laws of Expected Value

Statistics Lecture Notes – Chapter 06

• The expected value of a constant is just the value of the constant.

• We can “pull” a constant out of the expected value expression (either as part of a sum with a random variable or as a coefficient of random variable ).

Page 9: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Varriance and Standart Deviation

Statistics Lecture Notes – Chapter 06

Varriance of a discrete distribution

Standart Deviation of a discrete distribution

σ

Page 10: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Laws of Varriance

Statistics Lecture Notes – Chapter 06

• The variance of a constant is zero.

• The variance of a random variable and a constant is just the variance of the random variable (perabove).

• The variance of a random variable and a constant coefficient is the coefficient squared times the variance of the random variable.

Page 11: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Probability Distributions

Statistics Lecture Notes – Chapter 06

Continuous Probability Distributions

Binomial

Hypergeometric

Poisson

Probability Distributions

Discrete Probability Distributions

Normal

Uniform

Exponential

Page 12: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Binomial Distribuiton

Statistics Lecture Notes – Chapter 06

Characteristics of the Binomial Distribution:

A trial has only two possible outcomes – “success” or “failure”

There is a fixed number, n, of identical trials The trials of the experiment are independent of each

other The probability of a success, p, remains constant

from trial to trial If p represents the probability of a success, then is

the probability of a failure

Page 13: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Binomial Distribuiton

Statistics Lecture Notes – Chapter 06

A manufacturing plant labels items as either defective or acceptable

A firm bidding for a contract will either get the contract or not

A marketing research firm receives survey responses of “yes I will buy” or “no I will not”

New job applicants either accept the offer or reject it

Page 14: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Binomial Distribuiton

Statistics Lecture Notes – Chapter 06

The binomial random variable counts the number of successes in n trials of the binomial experiment. It can take on values from 0, 1, 2, …, n. Thus, its a discrete random variable.

P(x)n

x ! n xp qx n x!

( )!=

--

= probability of successes in trials, with probability of success on each trial

= number of ‘successes’ in sample, = probability of “success” per trial = probability of “failure” = (1 – p) = number of trials (sample size)

Page 15: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Binomial Distribuiton

Statistics Lecture Notes – Chapter 06

Ex6.2 – Pat Statsdud is a student taking a statistics course. He is not good student. Pat intends to rely on luck to pass the exam. Exam consist of 10 multiple chocies (5 possible answers) questions.

a. What is the possibility that pat gets no answers correct?

b. What is the possibility that pat gets two answers correct?

Page 16: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Binomial Distribuiton

Statistics Lecture Notes – Chapter 06

c. What is the probability that Past pass the exam? (minimum %50 requried)

P(X ≤ 4) = .967

Page 17: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Binomial Distribuiton

Statistics Lecture Notes – Chapter 06

d. What is the possibility that pat gets two answers correct? Find this probability with using Binom tables

P(X = 2) = P(X≤2) – P(X≤1) = .678 – .376 = .302

Page 18: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Binomial Distribuiton

Statistics Lecture Notes – Chapter 06

Mean:

Variance:

Standart Deviation:

Page 19: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Poisson Distribuiton

Statistics Lecture Notes – Chapter 06

Named for Simeon Poisson, the Poisson distribution is a discrete probability distribution and refers to the number of events (a.k.a. successes) within a specific time period or region of space

The number of cars arriving at a service station in 1 hour. (The interval of time is 1 hour.)

The number of flaws in a bolt of cloth. (The specific region is a bolt of cloth.)

The number of accidents in 1 day on a particular stretch of highway. (The interval is defined by both time, 1 day, and space, the particular stretch of highway.)

Page 20: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Poisson Distribuiton

Statistics Lecture Notes – Chapter 06

Like a binomial experiment, a Poisson experiment has four defining characteristic properties:

1. The number of successes that occur in any interval is independent of the number of successes that occur in any other interval.

2. The probability of a success in an interval is the same for all equal-size intervals

3. The probability of a success is proportional to the size of the interval.

4. The probability of more than one success in an interval approaches 0 as the interval becomes smaller.

Page 21: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Poisson Distribuiton

Statistics Lecture Notes – Chapter 06 1.21

The Poisson random variable is the number of successes that occur in a period of time or an interval of space in a Poisson experiment.

E.g. On average, 96 trucks arrive at a border crossingevery hour.

E.g. The number of typographic errors in a new textbook edition averages 1.5 per 100 pages.

successes

time period

successes (?!) interval

Page 22: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Poisson Distribuiton

Statistics Lecture Notes – Chapter 06

Like a binomial experiment, a Poisson experiment has four defining characteristic properties:

where:= size of the segment of interest = number of successes in segment of interest= expected number of successes in a segment of unit

size= base of the natural logarithm system (2.71828...)

!

)()(

x

etxP

tx

Page 23: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Poisson Distribuiton

Statistics Lecture Notes – Chapter 06

Ex6.3 - The number of typographical errors in new editions of textbooks varies considerably from book to book. After some analysis he concludes that the number of errors is Poisson distributed with a mean of 1.5 per 100 pages. The instructor randomly selects 100 pages of a new book. What is the probability that there are no typos?

𝑃 (𝑥=0 )=𝜇𝑥𝑒−𝜇

𝑥 !=1.50𝑒−1.5

0 !=0.2231

There is about a 22% chance of finding zero errors

Page 24: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Poisson Distribuiton

Statistics Lecture Notes – Chapter 06

Ex6.4 – Considering the Ex6.3, If instructor randomly selected 400 pages of the book, what is the probability of no typos?

For 400 pages

𝑃 (𝑥=0 )=𝜇𝑥𝑒−𝜇

𝑥 !=60𝑒− 6

0 !=0.002479

there is a very small chance there are no typos

Page 25: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Hypergometric Distribuiton

Statistics Lecture Notes – Chapter 06

“” trials in a sample taken from a finite population of size

Sample taken without replacement

Trials are dependent

Concerned with finding the probability of “” successes in the sample where there are “” successes in the population

Page 26: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Hypergometric Distribuiton

Statistics Lecture Notes – Chapter 06

Two possible outcomes per trial: success or failure

Nn

Xx

XNxn

C

CCxP

)(

Where = population size

= number of successes in the population = sample size = number of successes in the sample

= number of failures in the sample

Page 27: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Hypergometric Distribuiton

Statistics Lecture Notes – Chapter 06

Ex6.5 - 3 Light bulbs were selected from 10. Of the 10 there were 4 defective. What is the probability that 2 of the 3 selected are defective?

3.0120

6.6)(

103

42

61

C

CC

C

CCxP

Nn

Xx

XNxn

)!(!

!

xnx

nC nx Note that,

Page 28: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Exercises

Statistics Lecture Notes – Chapter 06

Q6.1 - The owner of a boat used for deep-sea fishing charters advertises that his clients catch at least one large salmon (over 15 pounds) on 60% of the charters. Suppose you book four charters for the coming year.

a. Find the probability distribution of X, the number of charters on which you catch at least one large salmon.

b. Find the probability of your chance to catch «at least two» large salmon on your 4 trip.

Page 29: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Exercises

Statistics Lecture Notes – Chapter 06

Q6.2 - The Globe and Mail (3 September 1987) has reported that 80% of Wall Street firms that speculate on corporate takeovers before they become public also help to underwrite such deals. A random sample of 10 firms that speculate on corporate takeovers is selected

a. Find the probability that at least half the firms selected underwrite takeovers.

b. Find the probability that at most three of the firms selected do not underwrite takeovers.

c. Find the expected value and variance of the number of firms selected that underwrite takeovers.

Page 30: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Exercises

Statistics Lecture Notes – Chapter 06

Q6.3 - According to Forbes Magazine, 27% of Americans would like to fly in the Space Shuttle. Three Americans are selected at random and asked if they would like to fly in the Space Shuttle. Find the probability distribution of X, the number of persons selected who respond positively.

Page 31: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Exercises

Statistics Lecture Notes – Chapter 06

Q6.4 - Records show that there is an average of three accidents each day in a certain city between 2 and 3 P.M.

a. Use the Poisson probability formula to find the probability that there will be exactly one accident between 2 and 3 P.M. on a particular day.

b. Use the table of Poisson probabilities to check your answer to part a).

c. Find the probability that there will be at least three accidents between 2 and 3 P.M. on a particular day.

d. Find the probability that there will be at least three accidents between 2 and 2:30 P.M. on a particular day.

Page 32: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Exercises

Statistics Lecture Notes – Chapter 06

Q6.5 - A shipment of 10 items has two defective and eight nondefective items. In the inspection of the shipment, a sample of items will be selected and tested. If a defective item is found, the shipment of 10 items will be rejected.

a. If a sample of three items is selected, what is the probability that the shipment will be rejected?b. If a sample of four items is selected, what is the probability that the shipment will be rejected?c. If a sample of five items is selected, what is the probability that the shipment will be rejected?d. If management would like a .90 probability of rejecting a shipment with two defective and eight nondefective items, how large a sample would you recommend?

Page 33: Statistics Lecture Notes Dr. Halil İbrahim CEBECİ Chapter 06 Random Variables and Discrete Probability Distributions.

Exercises

Statistics Lecture Notes – Chapter 06

Q6.5 - Blackjack, or twenty-one as it is frequently called, is a popular gambling game played in Las Vegas casinos. A player is dealt two cards. Face cards (jacks, queens, and kings) and tens have a point value of 10. Aces have a point value of 1 or 11. A 52-card deck contains 16 cards with a point value of 10 (jacks, queens, kings, and tens) and four aces.

a. What is the probability that both cards dealt are aces or 10-point cards?

b. What is the probability that both of the cards are aces?c. What is the probability that both of the cards have a

point value of 10?