Top Banner
Random Variable
41

Random Variable

Jan 31, 2016

Download

Documents

elkan

Random Variable. Random variable. A random variable χ is a function (rule) that assigns a number to each outcome of a chance experiment. - 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: Random Variable

Random Variable

Page 2: Random Variable

Random variableA random variable χ is a function (rule) that

assigns a number to each outcome of a chance experiment.

A function χ acts on the elements of its domain (the sample space) associating each element with a unique real number. The set of all values assigned by the random variable is the range of this function. If that set is finite, then the random variable is said to be finite discrete. If that set is infinite but can be written as a sequence, then the random variable is said to be infinite discrete. If that set is an interval then the random variable is said to be continuous.

Page 3: Random Variable

Example (1)

A coin is tossed 3 times. Let the random variable χ denotes the number of heads that occur in 3 tosses.

1. List the outcomes of the experiment (Find the domain of the function χ)

Answer:

The outcomes of the experiments are those of the sample space

S = { HHH, HHT, HTH, THH, HTT, THT, TTH, TTT }

= the domain of the function (random variable) χ

2. Find the value assigned to each outcome by χ

See the table on the following slide.

Page 4: Random Variable

OutcomeValue of Χ

HHH3

HHT2

HTH2

THH2

HTT1

THT1

TTH1

TTT0

Page 5: Random Variable

3. Let E be the event containing the outcomes to which a value of 2 has been assigned by χ. Find E!

Answer:

E = {HHT, HTH, THH }

4. Is χ finite discrete, infinite discrete or continuous?

Answer:

The set of the values assigned by χ is:

{ 0, 1, 2, 3}, which is a finite set, hence the random variable is χ finite discrete

Page 6: Random Variable

Example (2)A coin is tossed repeatedly until a head occurs. Let the random

variable χ denotes the number coin tosses in the experiment1. List the outcomes of the experiment (Find the domain of the function

χ)AnswerThe outcomes of the experiments are those of the sample spaceS = { H, TH, TTH, TTTH, TTTTH, TTTTTH, TTTTTTH, …. }= the domain of the function (random variable) χ

2. Find the value assigned to each outcome by χ See the table on the following slide which shows some of these values.

Page 7: Random Variable

OutcomeValue of Χ

H1

TH2

TTH3

TTTH4

TTTTH5

TTTTTH6

TTTTTTH7

….Etc etc…..

Page 8: Random Variable

3. Is χ finite discrete, infinite discrete or continuous?

Answer:

The set of the values assigned by χ is:

{1, 2, 3, 4, 5, 6, 7, 8, 9, ……..}, which is a infinite set, that can written as a sequence, hence the random variable is χ is infinite discrete

Page 9: Random Variable

Example (3)

A flashlight is turned on until the battery runs out. Let the Radom variable χ denote the length (time) of the life of the battery. What values may χ assume ? Is χ finite discrete, infinite discrete or continuous?

Answer:The set of possible values is the interval [0,∞), and

hence the random variable χ is continuous.

Page 10: Random Variable

Probability Distribution of Random variable

Page 11: Random Variable

Probability Distribution of Random variable

A table showing the probability distribution associated with the random variable ( which is associated with the experiment) rather than with the outcomes (which are related to the random variable)

Page 12: Random Variable

Example (4)

A coin is tossed 3 times. Let the random variable χ denotes the number of heads that occur in 3 tosses.

Show the probability distribution of the random variable associated with the experiment.

Page 13: Random Variable

OutcomeValue of Χ

HHH3

HHT2

HTH2

THH2

HTT1

THT1

TTH1

TTT0

Page 14: Random Variable

probability distribution of the random variable X

Value of ΧP(X=x)

01/8

13/8

23/8

31/8

Page 15: Random Variable

Example (5)

Two dice are rolled. Let the random variable χ denotes the sum of the numbers on the faces that fall uppermost.

Show the probability distribution of the random variable X.

Answer:

The values assumed by the random variable X are 2, 3, 4, 5, 6,….,12, corresponding to the events E2, E3, E4,….,E12.

The probabilities associated with the random variable X corresponding to 2, 3, 4, …,12 are the probabilities p(E2), p(E3),, p(E4), …., p(E12)..

Page 16: Random Variable

Sum ofuppermost numbers Event Ek

2{ (1 ,1) }

3{ (1,2) , (2 ,1) }

4{ (1,3) , (2 , 2) , (3 ,1) }

5{ (1, 4) , (2 , 3) , (3 , 2) , (4 ,1) }

6{ (1 , 5 ) , (2 , 4) , (3 , 3) , (4 , 2) , (5 ,1) }

7{(1, 6) , (2 , 5) , (3,4) , (4 , 3) , (5 , 2) , (6 ,1)}

8{ (2 , 6) , (3 , 5) , (4 , 4) , (5 ,1) , (6 , 2) }

9{ (3 , 6) , (4 , 5) , (5 , 4) , (6 , 3) }

10{ (4 , 6) , (5 , 5) , (6 , 4) }

11{ (5 , 6) , (6 , 5) }

12{(6,6)}

Page 17: Random Variable

Probability Distribution of the Random Variable X

xp(X=x)

21/36

32/36

43/36

54/36

65/36

76/36

85/36

94/36

103/36

112/36

121/36

Page 18: Random Variable

Example (6)The following table shows

the number of cars observed waiting in line at the beginning of 2 minutes interval from 10.00 am to 12.00 noon at the drive-in ATM of QNB branch in Ghrafa and the corresponding frequency of occurrence. Show the probability distribution table of the random variable x denoting the number of cars observed waiting in line.

CarsFrequency of Occurrence

02

19

216

312

48

56

64

72

81

Page 19: Random Variable

Dividing the frequency by 60 (the sum of these numbers- the ones indicating

frequency), we get the respective probability associated with random variable X.

Thus:

P(X=0) = 2/60 =1/30 ≈0.03

P(X=1) = 9/60 = 3/20 =0.15

P(X=2) = 16/60 = 1/10 = 0.1

….etc

See the opposite table

Cars

x

Frequency of Occurrence

p(X = x)

02/60 ≈ 0.03

19/60 ≈ 0.15

216/60 ≈ 0.27

312/60 ≈ 0.20

48/60 ≈ 0.13

56/60 ≈ 0.10

64/60 ≈ 0.07

72/60 ≈ 0.03

81/60 ≈ 0.02

Page 20: Random Variable

Bar Charts ( Histograms )

A bar chart or histogram is a graphical means of exhibiting probability distribution of a random variable.

For a given probability distribution, a histogram is constructed as follows:

1. Locate the values of the random variable on the number line (x-axis)

2. Above each number (value) erect a rectangle of width 1 and height equal to the probability asociated with that number (value).

Page 21: Random Variable

1. The area of rectangle associated with the value of the random variable x

= The probability associated with the value x (notice tat the width of the rectangle is 1)

2. The probability associated with more than one value of the random variable x is given by the sum of the areas of the rectangles associated with those values.

Remarks

Page 22: Random Variable

Example

Back to the example of three tosses of the coin

Page 23: Random Variable

OutcomeValue of Χ

HHH3

HHT2

HTH2

THH2

HTT1

THT1

TTH1

TTT0

Page 24: Random Variable

Probability Distribution

x p(X=x)

0 1/8

1 3/8

2 3/8

3 1/8

OutcomeValue of Χ

HHH3

HHT2

HTH2

THH2

HTT1

THT1

TTH1

TTT0

Page 25: Random Variable

1 0 2 3

8

3

8

1

8

2

8

4

x

Page 26: Random Variable

The event F of obtaining at least two headsF = {HHH, HHT, HTH, THH}P(F) = 4/8 = ½ The same result can be obtained from the following

reasoning:F is the event: “(X=2) or (X=3)”The probability of this event is equal to:p(X=2) + p(X=3)= the sum of the areas of the rectangles associated with

the values 2 and 3 of the random variable= 1(3/8) + 1(1/8)= 4/8 = ½ on the following slide, these areas are identified (the

shaded areas)

Page 27: Random Variable

8

1

8

2

8

3

8

4

0 1x

2 3

Page 28: Random Variable

Expected Value of a Random Variable

Page 29: Random Variable

Mean (Average)

The average (mean) of the numbers a1, a2,

a3,……. an is denoted by ā and equal to:

(a1+a2+a3+…….+an ) / n

Example:

Find the average of the following numbers:

5, 7, 9, 11, 13

Answer: The average of the given numbers ie equal to ( 5+7+9+11+13) / 5 = 45 / 5 = 9

Page 30: Random Variable

Expected Value of a Random Variable( the average or the mean of the random variable)

Let x be a random variable that assumes the values x1, x2, x3,……. xn with associated probabilities p1, p2, p3,……. pn respectively. Then the expected value of x denoted by E(x) is equal to

x1 p1 + x2 p2 + x3 p3 +……+ xn pn

Page 31: Random Variable

The the expected value of x ( the average or the mean of X) is a measure of central tendency of the probability distribution associated with X.

As the number of the trails of an experiment gets larger and larger the values of x gets closer and closer to the expected value of x.

Geometric Interpretation:Consider the histogram of the probability distribution

associated with the random variable X. If a laminate (thin board or sheet) is made of this histogram, then the expected value of X corresponds to the point on the base of the laminate at which the laminate will balance perfectly when the point is directly over the a fulcrum (balancing object).

Page 32: Random Variable

36

1

36

2

36

3

36

4

36

5

36

6

2 3 4 5 6 7 8 9 10 11 12 x

Page 33: Random Variable

Example (7)

Let X be the random variable giving the sum of the dots on the faces that fall uppermost in the two dice rolling experiment. Find the expected value E(X) of X.

Page 34: Random Variable

Recall the probability distribution of the this random variable

xP(X=x)

21/36

32/36

43/36

54/36

65/36

76/36

85/36

94/36

103/36

112/36

121/36

Page 35: Random Variable

SolutionE(X)

= 2(1/36) + 3(2/36) + 4(3/36) + 5(4/36) + 6(5/36) + 7(6/36) + 8(5/36) + 9(4/36) + 10(3/36) + 11(2/36) + 12(1/36)

=(2+6+12+20+30+42+40+36+30+22+12) / 36 = 252 / 36

= 7

Inspecting the histogram on the next slide, we notice that the symmetry of the histogram with respect to the vertical line x = 7, which is the expected value of the random variable X.

Page 36: Random Variable

36

1

36

2

36

3

36

4

36

5

36

6

2 3 4 5 6 7 8 9 10 11 12 x

Page 37: Random Variable

Example (8)

The occupancy rates with corresponding probability of hotels A (Which has 52 rooms) & B (which has 60 rooms) during the tourist season are given by the tables on the next slide. The average profit per day for each occupied room is QR 200 and QR 180 for hotels A & B respectively. Find:

1. The average number of rooms occupied per day in each hotel.

2. Which hotel generates the higher daily profit.

Page 38: Random Variable

Hotel A

Occupancy Rate Probability

0.80 0.19

0.85 0.22

0.90 0.31

0.95 0.23

1.00 0.05

Hotel B

Occupancy Rate Probability

0.75 0.35

0.80 0.21

0.85 0.18

0.90 0.15

0.95 0.09

1.00 0.02

Page 39: Random Variable

Steps

I. For each hotel:1. Find the expected value of the random variable

defined to be the occupancy rate in the hotel.2. Multiply that by the number of rooms of the hotel

to find the average number of rooms occupied per day.

3. Multiply that by the profit made on each room per day to find the hotel daily profit.

II. Compare the result of step 3., for hotels A & B.

Page 40: Random Variable

Solution1. Let the occupancy rate in Hotels A & B be the random

numbers X & Y respectively. Then the average daily occupancy rate is given by the expected values E(X) and E(Y) of X and Y respectively. Thus:

E(X) = (0.80)(0.19) + (0.85)(0.22) + (0.90)(0.31) + (0.95)(0.23) + (1.00)(0.05) ≈ 0.8865

The average number of rooms occupied per day in Hotel A= 0.8865 (52) ≈ 46.1 rooms

E(Y) = (0.75)(0.35) + (0.80)().21) + (0.85)(0.18) + (0.90)(0.15) + (0.95)(0.09) + (1.00)(0.02) ≈ 0.8240

The average number of rooms occupied per day in Hotel A= 0.8240 (60) ≈ 49.4 rooms

Page 41: Random Variable

2. The expected daily profit at hotel A

= (46.1 )(200) ≈ 9220

The expected daily profit at hotel B

= (49.4 )(180) ≈ 8890

→ hotel A generates a higher profit