Sie sind auf Seite 1von 40

Random Variables

A variable that associates a number with the outcome of a random experiment is a random variable Denoted by an uppercase letter such as X

Examples:

If two dice are thrown, the sum of the faces is a random variable, as in: X = 3, X = 11, etc.

If two coins are tossed, then the number of heads is a random variable, as in: X = 0, X = 2, etc. In a speed (rpm) measurement: X = 457, X = 1209, etc. In a dimension measurement with the help of a caliper: X = 23.46, X =

48.97, etc.

Random Variables (cont)


Discrete Random Variables A random variable with a finite or countable infinite range Examples:

Number of scratches on a surface Proportion of defective parts among 1000 tested Number of people arriving at a bank in a given time interval

Random Variables (cont)


Continuous Random Variables A random variable with an interval (either finite or infinite) of real numbers for its range Examples:

Length dimension (like diameter of a shaft) Time dimension (like time between failure for a machine) Temperature dimension (like temperature inside a heat treatment furnace)

Random Variables (cont)


Expression of Random Variables The manner in which random variables are expressed sometimes depends on the problem at hand

Sometimes

a random variable is discrete in nature, but it is

treated continuous

This is because the range of values it can take is too large Example: Marks of a student in a 100 marks paper

Sometimes a random variable is continuous in nature, but it is treated discrete

This is because the exact value (to the smallest level) is not required Example: Age of a person may be expressed as a discrete random variable forming different categories: 0-21, 21-35, 35-50, 50-65, 65+

Discrete Random Variables


Examples:

If two coins are tossed and we are interested in the event number of heads obtained, then:
P(X = 0) = 0.25
P(X = 2) = 0.25

P(X = 1) = 0.50
P(X = 3) = 0

P(X > 1) = 1 [P(X = 0) + P(X = 1)] = 1 (0.25 + 0.50) = 0.25

In a lot that contains 10% defective pieces, if we are interested in the number of defective pieces in a sample of 5 then:
P(X = 0) = 0.590 P(X = 2) = 0.073 P(X = 4) 0.001 P(X = 1) = 0.328 P(X = 3) = 0.008 P(X = 5) 0.000

P(X <= 2) = P(X = 0) + P(X = 1) + P(X = 2) = 0.590 + 0.328 + 0.073 = 0.991


5

Discrete Random Variables (cont)


Terminologies associated with discrete random variables

Probability mass function (pmf) denoted by f(x) Cumulative distribution function (cdf) denoted by F(x)

1 5/6 F(x) 4/6 3/6 f(x) x 0 1 2 3 4 5 6 x 2/6 1/6

Probability mass function of a fair dice

Cumulative distribution function of a fair dice

f(xi) = P(X = xi)

F(x) = P(X <= x) = f(xi)


xi <= x

Discrete Random Variables (cont)


Mean and Variance of a Discrete Random Variables Mean of a discrete random variables

Mean is the expected value of the random variable denoted by or

E(X)
It is the measure of the center of the probability distribution Formula: = E(X) = x f(x)
x

Variance of a discrete random variables

Denoted by 2 or V(X) It is the measure of the dispersion or variability in the probability distribution Formula: 2 = V(X) = x x2 f(x) 2 The standard deviation () of X is the square root of the variance
7

Bernoulli Trial
A basic building block for all the distributions A trail with only two possible outcomes

Usually termed as: success and failure

The trials constitute random experiment and are independent


The outcome from one trial has no effect on the outcome obtained from other trials

Probability of a success (as well as a failure) in each trial is constant Examples:

Did tossing of a coin lead to a head (success) or not? Did the student pass the exam (success) or not? Did India lose the match (success) or not? Was the part defective (success) or not?
8

Binomial Random Variable


A random experiment consists of n Bernoulli trials such that:

The trials are independent Each trial results in only two possible outcomes success and failure The probability of success in each trial (denoted as p) remains constant

The random variable X that equals the number of trials that result in a success has a binomial random variable A binomial distribution is denoted by: B(n, p)

n and p are the parameters of the binomial distribution

n = 1, 2, 3,

and

0<p<1

The pmf of the binomial random variable X is given by:


f(x) = nCx px (1 p)n-x Note:
nC x

x = 0, 1, 2, , n

= n! / [x! (n-x)!]

For a binomial random variable with parameters n and p:


mean = = n p and variance = 2 = n p (1-p)
9

Poisson Distribution
It is derived from a binomial distribution

Limiting case of the binomial distribution Applied to systems with large number of possible events, each of which are rare

With reference to a binomial distribution, if n becomes very large and p becomes considerably small, such that the product of n and p (denoted by ) remains some manageable constant, then limn P(X = x) = (e x) / (x!) Example (to distinguish Poisson distribution from Binomial distribution):

A page in a book can have two outcomes: with error and without error The probability of with error in a page of a book published by a good

publishing house is very small (this is the p)


But the number of pages in the book will be large, say 500 (this is n) In this case, the distribution of number of errors in a book will be a Poisson distribution
10

Poisson Distribution (cont)


A Poisson distribution is denoted by Pois() is the parameter of the Poisson distribution

is the product of n and p

The pmf of the Poisson random variable X is given by:

f(x) = (e x) / (x!)

x = 0, 1, 2,

>0

Note: The range of X is integers from 0 to infinity (and not bounded by n)

For a Poisson random variable with parameter :


mean = = and variance = 2 =

Important Notes:
In practical applications, will correspond to the rate of something per some unit (example: number of people arriving at a bank per hour, number of defects per square meter of a surface) It is important to use consistent units in calculating probabilities, means, and variances involving Poisson random variables
11

Problems
Discrete Random Variables A batch of 500 machined parts contains 10 that are defective. Parts are selected successively without replacement, until a nonconforming part is obtained. The random variable is the number of parts selected.

What is the range of random variables?

12

Problems (cont)
pmf, cdf, mean and variance of Discrete Random Variables In a semiconductor manufacturing process, three wafers from a lot are tested. Each wafer is classified as pass or fail. Assume

that the probability that the wafer passes the test is 0.8, and that
the wafers are independent.

Determine the probability mass function of the number of wafers from a lot that passes the test. Determine the cumulative distribution function for the random variable. Determine the mean and the variance of the random variable.

13

Problems (cont)
Binomial Distribution Because not all airline passengers show up for their reserved seat, an airline adopts a policy of overbooking 5 seats for a flight that has a capacity of 120 seats. The probability that a passenger does not show up is 0.1 and all the passengers are assumed to behave

independently.

What is the probability that every passenger who shows up can take the flight? What is the probability that the flight departs with empty seat(s)?

14

Problems (cont)
Binomial Distribution A manufacturer has 100 customer orders to be satisfied. Each order requires on component part that is purchased from a

supplier. However, 2% of the components are identified as


defective and the components are assumed to be independent.

If the manufacturer stocks 100 components what is the probability that the 100 orders can be filled up? If the manufacturer stocks 105 components what is the probability that the 100 orders can be filled up?

15

Problems (cont)
Binomial Distribution A multiple choice test contains 25 questions, each with 4 answers. Assume that a student just guesses each question.

What is the probability that a student answers more than 20 questions correctly? What is the probability that the student answers less than 5 questions correctly?

What will be the mean marks scored by a student?


What is the variance of the marks scored?

16

Problems (cont)
Poisson Distribution Suppose that the number of customers that enter a bank in an hour is a Poisson random variable, and suppose that P(X = 0) = 5%.

Determine the mean of X? Determine the variance of X?

17

Problems (cont)
Poisson Distribution The number of surface flaws in plastic panels used in the interior of automobiles has a Poisson distribution with a mean of 0.05 flaws per square foot of plastic panel. Assume that an automobile interior contains 10 square feet of plastic panel.

What is the probability that there are no surface flaws in an autos interior?

If 10 cars are sold to a rental company, what is the probability that none
of the 10 cars has any surface flaws? If 10 cars are sold to a rental company, what is the probability that at most one car has any surface flaws?

18

Problems (cont)
Poisson Distribution The number of failures of a testing instrument from contamination particles on the product is a Poisson random variable with a mean of 0.02 failures per hour.

What is the probability that the instrument does not fail in an 8-hour shift? What is the probability that there is at least one failure in a 24-hour

day?

19

Continuous Random Variables


Examples:

When a machine breaks down, it is serviced. It runs for some time until it again breaks down. We are interested in the event time (in hours)

between successive breakdowns, then:


P(X < 10) = ? P(50 < X < 150) = ? P(X > 250) = ?

A finance executive wants to predict the various financial ratios (say X,


Y, etc.) of different organizations, based on past data. For a particular organization, he may be interested in:
P(X > 0.75) = ? P(0.35 < X < 0.50) = ? P(Y < 0.6) = ?

20

Continuous Random Variables (cont)


Terminologies associated with continuous random variables

Probability density function (pdf) denoted by f(x) Cumulative distribution function (cdf) denoted by F(x) pdf cdf
An alternative way to represent the distribution

Resembles a histogram Used to calculate an area that represents the probability that X takes the values between [a, b] P(a <= X <= b) = f(x)dx
a b

Extends the definition of f(x) to


the entire real line F(x) = P(X <= x) = f(u)du for x
- x

Example:

21

Continuous Random Variables (cont)


Mean and Variance of a Continuous Random Variables Mean of a continuous random variables

Defined similarly to that of a discrete random variable

Denoted by or E(X)
Formula:

E(X) [x f(x)]dx

Variance of a continuous random variables

Defined similarly to that of a discrete random variable Denoted by 2 or V(X)

Formula:

V(X) { [x 2 f(x)]dx}- 2

The standard deviation () of X is the square root of the variance

22

Uniform Distribution
The simplest type of continuous distribution Often denoted by: U(a, b) The pdf of a uniform distribution is:
f(x) = 1 / (b a), a <= x <= b

a and b are the parameters of the uniform distribution For a uniform random variable over a <= x <= b:
mean = = [(a + b)/2] and variance = 2 = [(b a)2 / 12]

23

Exponential Distribution
Preamble:

For a Poisson distribution, the number of people arriving at a bank in one hour (i.e. arrival rate) is of interest In some cases the time between arrivals may be of interest This is exactly what is described by an exponential distribution If the arrival rate is a Poisson random variable then the corresponding time between arrivals is an exponential random variable

Denoted by: Exp()

is the parameter of the exponential distribution Important: is the mean of the corresponding Poisson process (example: arrival rate, and not the mean time between arrivals)

The pdf of an exponential distribution is:


f(x) = e-x for 0 <= x <=
24

Exponential Distribution (cont)


The cdf of an exponential distribution is:
F(x) = P(X <= x) = 1 e-x for x >= 0

For an exponential random variable with parameter :


mean = = [1 / ] and variance = 2 = [1 / (2)]

Lack of memory property of the exponential distribution

Mathematically: P(X < (t1 + t2) | X > t1) = P(X < t2) Implication (Example): Suppose the time between arrival of a city bus is exponentially distributed with a mean of 15 minutes. If you have already waited at the bus stop for 1 hour, then the probability that a bus will arrive in the next 10 minutes is equal to the probability that a bus would have arrived in the next 10 minutes as soon as you come to the bus stop (that is, without the fact that you waited for one hour)
25

Normal Distribution
Preamble:

The most widely used model for describing a random variable The mean, median, and mode of a normal random variable is same The range of variable extends from - to +

Denoted by: N(, 2)


and 2 are the parameters of the normal distribution

26

Normal Distribution (cont)


A normal random variable described by N(0, 1), that is = 0 and 2 = 1, is called a standard normal random variable

Denoted by Z

Any normal random variable X ~ N(, 2) can be mapped to the standard normal random variable:

Z = [(X ) / ]

How to read and use the standard normal distribution table?

27

Problems
pdf, mean and variance of Continuous Random Variables The probability density function of the length of a metal rod is f(x) = 2 for 2.3 < x < 2.8 meters

If the specifications of this process are 2.25 to 2.75 meters, what


proportion of the rods fail to meet the specifications? Determine the mean and the variance of the length of the metal rod

28

Problems (cont)
Uniform Distribution The net weight (in kilogram) of a packaged chemical powder follows a uniform distribution for 49.75 < x < 50.25 kilogram

Determine the mean and the variance of the weight of the packages.
Determine the probability of a randomly selected package being less than 50.1 kilogram.

29

Problems (cont)
Exponential Distribution The time between arrivals of taxis at a busy intersection is exponentially distributed with a mean of 10 minutes.

What is the probability that you wait longer than one hour for a taxi?
Suppose you have already been waiting for one hour for a taxi, what is the probability that one arrives within the next 10 minutes?

30

Problems (cont)
Exponential Distribution The lifetime of a mechanical assembly in a vibration test is exponentially distributed with a mean of 400 hours.

What is the probability that an assembly on test fails in less than 100
hours? What is the probability that an assembly operates for more than 500 hours before failure?

If an assembly has been on test for 400 hours without a failure, what is
the probability of a failure in the next 100 hours?

31

Problems (cont)
Normal Distribution
The compressive strength of samples of cement can be modeled by a normal distribution with a mean of 6000 kilograms per square centimeter and a standard deviation of 100 kilograms per square centimeter.

What is the probability that a samples strength is less than 6250 Kg/cm2? What is the probability that a samples strength is between 5800 and 5900 Kg/cm2? What strength is exceeded by 95% of the samples?

32

Problems (cont)
Normal Distribution
The reaction time of a driver to visual stimulus is normally distributed with a mean of 0.4 seconds and a standard deviation of 0.05 seconds.

What is the probability that a reaction requires more than 0.5 seconds?
What is the probability that a reaction requires between 0.4 and 0.5 seconds?

What is the reaction time that is exceeded 90% of the time?

33

Linear Combination of Random Variables


The linear combination of random variables leads to another random variable.

Example: If length (say X1) and width (say X2) are random variables,
then the perimeter (say Y) is another random variable and Y = 2(X1 + X2)

Y is a linear combination of X1 and X2

In general, given random variables X1, X2, , Xp and constants c1, c2, , cp, then:

Y = c1X1 + c2X2 + + cpXp is a linear combination of X1, X2, Xp

34

Linear Combination of Random Variables (cont)


If Y is a linear combination of X1, X2, Xp AND if X1, X2, , Xp are independent, then

Mean of Y is:
E(Y) = c1 E(X1) + c2 E(X2) + + cp E(Xp) Variance of Y is:

V(Y) = c12 V(X1) + c22 V(X2) + + cp2 V(Xp)

35

Linear Combination of Random Variables (cont)


Special Case 1 Combination that represents the average of p independent random variables with identical means and variances
If X1, X2, Xp are independent random variables, with each having a
mean and a variance 2 and if Y = [(X1 + X2 + + Xp) / p], then,

Mean of Y is:
E(Y) = (1/p) + (1/p) + (1/p) + . = [p times]

Variance of Y is:
V(Y) = (1/p)2 2 + (1/p)2 2 + (1/p)2 2 + . = 2 / p
36

[p times]

Linear Combination of Random Variables (cont)


Special Case 2 Reproductive property of Normal Distribution
If X1, X2, Xp are independent normal random variables, such that:

X1 ~ N(1, 12), X2 ~ N(2, 22), X3 ~ N(3, 32), , Xp ~ N(p, p2),


and if Y = c1X1 + c2X2 + + cpXp then,

Y is also a normal random variable


Mean of Y is: E(Y) = c1 1 + c2 2 + + cp p

Variance of Y is:
V(Y) = c12 12 + c22 22 + + cp2 p2

37

Problems
Linear combination of random variables
Soft-drink cans are filled by an automated filling machine and the standard deviation is 0.5 oz. Assume that the fill volumes of the cans are independent, normal random variables.

What is the standard deviation of the average fill volume of 100 cans? If the mean fill volume of a can is 12.1 oz, what is the probability that the average fill volume of the 100 cans is below 12 oz?

What should the mean fill volume equal so that the probability that the
average of 100 cans is below 12 oz is 0.005? If the mean fill volume is 12.1 oz, what should the standard deviation of fill volume equal so that the probability that the average of 100 cans is below 12

oz is 0.005?

If the mean fill volume is 12.1 oz and the standard deviation is 0.5 oz, determine the number of cans that need to be selected such that the probability that the average fill volume is less than 12 oz is 0.01.
38

Problems (cont)
Linear combination of random variables
Assume that the weights of individuals are independent and normally distributed with a mean of 160 pounds and a standard deviation of 30 pounds. Suppose that 25 people squeeze into an elevator that is designed to hold 4300 pounds.

What is the probability that the load (total weight) exceeds the design limit? What design limit is exceeded by 25 occupants with probability 0.001?

39

Problems (cont)
Linear combination of random variables
The width of a casing for a door is normally distributed with a mean of 24 inches and a standard deviation of 0.125 inch. The width of a door is normally distributed with a mean of 23.875 inches and a standard deviation of 0.0625 inch. Assume independence.

Determine the mean and standard deviation of the difference between the width of the casing and the width of the door.

What is the probability that the width of the casing minus the width of the door exceeds 0.25 inch? What is the probability that the door does not fit in the casing?

40

Das könnte Ihnen auch gefallen