Probability Distributions Finite Random Variables.

39
Probability Distributions Finite Random Variables
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    243
  • download

    1

Transcript of Probability Distributions Finite Random Variables.

Probability Distributions

Finite Random Variables

Probability Distributions Recall a Random Variable was:

numerical value associated with the outcome of an experiment that was subject to chance

Examples: The number of heads that appear when flipping three coins The sum obtained when two fair dice are rolled Value of an attempted loan workout

Finite Random Variables

Types of random variables: Finite Random Variable:

Can only assume a countable number of values (i.e. they can all be listed)

Examples Flipping a coin three times & recording # of heads Rolling a pair of dice & recording the sum on each roll

Finite Random Variables Types of Random Variables (cont):

Continuous Random Variable: Can assume a whole range of values which cannot be

listed: Examples:

Arrival times of customers using an ATM at the start of the hour

Time between arrivals Length of service at an ATM machine

We’ll first look at finite random variables

Finite Random Variables

Ex: Suppose we flip a coin 3 times and record each flip. Let X be a random variable that records the # of heads we get.

What are the possible values of X?

TTTTTHTHTTHHHTTHTHHHTHHHS ,,,,,,,

Finite Random Variables

X can be 0, 1, 2, or 3

Notice that we can list all possible values of the random variable X

This makes X a finite random variable

Finite Random Variables

Recall Told us the probability the random variable X

(upper case) assumed a certain value x (lower case)

List all possible values of x (lower case) and their probabilities in table

xXP

x P (X=x )

0 0.1251 0.3752 0.3753 0.125

Finite Random Variables

Notice each value of the random variable has one probability associated with it

For a finite random variable we call this the probability mass function

Abbreviated (p.m.f.)x P (X=x )

0 0.1251 0.3752 0.3753 0.125

Finite Random Variables

Why a function? Each value of the random variable has exactly one

probability assigned to it Since this is a function, the following are

equivalent for a finite random variable:

xXPxfX

Finite Random Variables

Like any function, the p.m.f. for a finite random variable has several properties: Domain: discrete numbered values

(e.g. {0, 1, 2,3} )

Range:

Sum: 10 xfX

1 All

x

X xf

Finite Random Variables If we graph a p.m.f., should be a histogram with sum

of all heights equal to 1

Each bar height corresponds to P(X=x)

P(X=x)

0

0.1

0.2

0.3

0.4

0 1 2 3

X=x

P(X=x)

Finite Random Variables

Cumulative Distribution Function Abbreviated c.d.f.

Determines probability of all events occurring up to and including a specific event

xXPxFX

Finite Random Variables

Ex: Find from our coin problem. Do the same for and

Sol:

0XF 7.1XF 2XF

125.000 XPFX

5.0)1(07.17.1 XPXPXPFX

875.021022 XPXPXPXPFX

Finite Random Variables

Notice:

Interval FX(x) = P(X≤x)

(-∞,0) 0

[0,1) 0.125

[1,2) 0.125 + 0.375=0.500

[2,3) 0.125+0.375+0.375=0.875

[3,∞) 0.125+0.375+0.375+0.125=1

Finite Random Variables

The last table is describing a piece-wise function:

3132875.021500.010125.0

00

xifxifxifxif

xif

xFX

Finite Random Variables

The graph of the c.d.f.F(X)

00.1250.25

0.3750.5

0.6250.75

0.8751

1.125

-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6

X=x

Finite Random Variables Notice for the c.d.f. of a finite random variable

Graph is a step-wise function

Domain is all real #s

Graph never decreases

Approaches 1 as x gets larger

Finite Random Variables

Ex. Use the sample space for rolling two dice to graph . xXP

S

( , ) ( , ) ( , ) ( , ) ( , ) ( , )

( , ) ( , ) ( , ) ( , ) ( , ) ( , )

( , ) ( , ) ( , ) ( , ) ( , ) ( , )

( , ) ( , ) ( , ) ( , ) ( , ) ( , )

(5, ) (5, ) (5, ) (5, ) (5, ) (5, )

( , ) (

1 1 1 2 1 3 1 4 1 5 1 6

2 1 2 2 2 3 2 4 2 5 2 6

3 1 3 2 3 3 3 4 3 5 3 6

4 1 4 2 4 3 4 4 4 5 4 6

1 2 3 4 5 6

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

Finite Random Variables

Soln.

0.00

0.02

0.04

0.06

0.08

0.10

0.12

0.14

0.16

0.18

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

x P (X =x )

1 0.00002 0.02783 0.05564 0.08335 0.11116 0.13897 0.16678 0.13899 0.1111

10 0.083311 0.055612 0.027813 0.0000

Finite Random Variables

Ex. Find in the previous example. Find in the previous example. Find in the previous example.

Soln.x P (X =x )

1 0.00002 0.02783 0.05564 0.08335 0.11116 0.13897 0.16678 0.13899 0.1111

10 0.083311 0.055612 0.027813 0.0000

3Xf 7Xf 7.2Xf

0556.03 Xf

1667.07 Xf

07.2 Xf

Finite Random Variables

Remember: Cumulative distribution function adds probabilities up to and including a certain value

Ex. Find in the previous example. Find in the previous example. Find in the previous example.

3XF 7XF 7.2XF

Finite Random Variables

Soln.x P (X =x )

1 0.00002 0.02783 0.05564 0.08335 0.11116 0.13897 0.16678 0.13899 0.1111

10 0.083311 0.055612 0.027813 0.0000

0833.00556.00278.00

33

XPFX

5833.01667.0...0278.00

77

XPFX

0278.00278.00

7.27.2

XPFX

Finite Random Variables

• Sample c.d.f.Cummulative Distribution Function

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

0 1 2 3 4 5 6 7 8 9 10

Finite Random Variables Notice the graph starts at height 0

Notice the graph ends at height 1

The graph “steps” to next height

The size of each “step” corresponds to the value of the p.m.f. at that x-value

Finite Random Variables

The bullet on the last slide gives us the ability to:

p.m.f. c.d.f

Finite Random Variables

Binomial Random Variable Special type of finite r.v.

Collection of Bernoulli Trials

Bernoulli Trial is an experiment with only 2 possible outcomes

Each trial is independent

Finite Random Variables Excel has a built in Binomial R.V. function

BINOMDIST

Finite Random Variables Ex: Suppose we flip a biased coin whose probability of

landing heads is 0.7. Let’s say we do this 3 times and record each flip. Let X be a random variable that records the # of heads we get.

This is an example of a binomial random variable

TTTTTHTHTTHHHTTHTHHHTHHHS ,,,,,,,

Finite Random Variables In Excel:

This is the p.m.f

X=x P(X=x)0 0.0271 0.1892 0.4413 0.343

Value of Random Variable

How many times you perform the experiment

Probability of success on each trial

FALSE (p.m.f) ; TRUE (c.d.f)

Finite Random Variables In Excel:

This is the c.d.f

X=x F(X)0 0.0271 0.2162 0.6573 1

Finite Random Variables

Ex. Historically, 83% of all students pass a particular class. If there are 34 students in the class, what is the probability that exactly 28 will pass? What is the probability that at least 28 students pass? What is the probability that at most 28 students pass?

Finite Random Variables What is the probability that exactly 28 students pass?

Soln: 0.1760

2828 XPfX

Finite Random Variables What is the probability that at least 28 students pass?

Soln: 1 - 0.3545 0.6455

271

27128128

XFXPXPXP

Finite Random Variables What is the probability that at most 28 students pass?

Soln: 0.5305

xFXP X28

Finite Random Variables

Sample p.m.f.Probability Mass Function

0

0.04

0.08

0.12

0.16

0.2

0 4 8 12 16 20 24 28 32

Finite Random Variables

Mean of a finite random variable same as expected value in project 1 add product of each value and it’s respective

probability

x

XX xfxXE possible all

Finite Random Variables

Ex. Historically, 83% of all students pass a particular class. If there are 34 students in the class, find the mean number of students that will pass.

Soln. Approximately 28.22 students will pass (Two ways this can be found)

Finite Random Variables

Method 1:

Use BINOMDIST to make p.m.f.

Then use:

X=x P(X=x) x*P(X=x)0 6.84326E-27 01 1.13598E-24 1.14E-242 9.15134E-23 1.83E-223 4.76587E-21 1.43E-204 1.80332E-19 7.21E-195 5.28267E-18 2.64E-176 1.24661E-16 7.48E-167 2.43455E-15 1.7E-148 4.01164E-14 3.21E-139 5.65825E-13 5.09E-12

10 6.90639E-12 6.91E-1111 7.35696E-11 8.09E-1012 6.88453E-10 8.26E-0913 5.68831E-09 7.39E-0814 4.16585E-08 5.83E-0715 2.71188E-07 4.07E-0616 1.5723E-06 2.52E-0517 8.12806E-06 0.00013818 3.74794E-05 0.00067519 0.000154095 0.00292820 0.000564259 0.01128521 0.001836607 0.03856922 0.005298661 0.11657123 0.013497356 0.31043924 0.030203643 0.72488725 0.058985939 1.47464826 0.099688905 2.59191227 0.144212272 3.89373128 0.176023803 4.92866629 0.177809034 5.15646230 0.144687744 4.34063231 0.091150533 2.82566732 0.041721476 1.33508733 0.012345392 0.40739834 0.001772781 0.060275

E(X) 28.22

x

XX xfxXE possible all

Finite Random Variables

Method 2:

There is a special formula that ONLY works for random variables that are binomially distributed:

pnXEX