probability distributions random variables: finite and continuous distribution functions expected...
Post on 21-Dec-2015
217 views
TRANSCRIPT
Probability DistributionsRandom Variables: Finite and Continuous
Distribution FunctionsExpected value
April 3 – 10, 2003
Random Variables
A random variable is a rule that assigns a numerical value to each outcome of an experiment
Two types:– Discrete:
Finite: It can take on only finitely many possible values (ex: X=0,1,2, or 3). In this case you can list all possible values.
Infinite: It can take on infinitely many values that can be arranged in a sequence (ex: X=1,2,3,4,…)
– Continuous: If the possible values form an entire interval of numbers (ex: any positive number)
Discrete Random Variables
We want to associate probabilities with the values that the random variable takes on.
There are two types of functions that allow us to do this:
Probability Mass Functions (p.m.f) Cumulative Distribution Functions (c.d.f)
Probability Distributions
The pattern of probabilities for a random variable is called its probability distribution.
In the case of a finite random variable we call this the probability mass function (p.m.f.), fx(x) where fx(x) = P( X = x )
1
all x
( ) 1. Thus, 0 ( ) 1 for any value of and
( ) 1
n
i Xi
X
P X x f x x
f x
Probability Mass Function (p.m.f)
Using the p.m.f. we can describe various probabilities of X geometrically
EX: Let X describe the number of heads obtained when you toss a fair coin twice.
x 0 1 2
P(X=x) or fX .25 .50 .25
From this table, we have the ordered pairs (0,.25),(1,.5),(2,.25)
Probability Mass Function
This is a p.m.f which is a histogram representing the probabilities
When a histogram is used, the r.v. X takes on integer values
In this case P(X=x) equals the area of the rectangle
Note: For a histogram to represent a p.m.f, the heights of the rectangles should sum to 1
– This is because the values along the y-axis represent probabilities
0
0.1
0.2
0.3
0.4
0.5
0 1 2
P(X=x)
Cumulative Distribution Function
The same probability information is often given in a different form, called the cumulative distribution function (c.d.f) or FX
FX(x) = P(Xx) 0 FX(x) 1, for all x In the finite case, the graph of a c.d.f. should
look like a step function, where the maximum is 1 and the minimum is 0.
Cumulative Distribution Function
Cumulative Distrib ution Function
0.0
0.2
0.4
0.6
0.8
1.0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
x
F X (x )
Graphing a CDF (Finite case)
Need to look at every possible x along the x-axis and see what value of the cdf corresponds to it
Look at intervals – i.e, less than 0, between 0 and 1, between 1 and 2, etc.
When looking at intervals, include the left most number but not the right most number – i.e, between 0 and 1, include 0 but not 1
Find the value of FX(x) = P(X x) that corresponds– For each interval you are looking at, FX(x) should be the same
number
Bernoulli Trials
In a Bernoulli Trial there are only two outcomes: success or failure
Let p = P(S) Bernoulli Random Variables were named after
Jacob Bernoulli (1654 – 1705) who was a famous Swiss mathematician
Binomial Random Variable
Let X stand for the number of successes in n Bernoulli Trials where X is called a Binomial Random Variable
Binomial Setting:1. You have n repeated trials of an experiment 2. On a single trial, there are only two possible outcomes
3. The probability of success is the same from trial to trial 4. The outcome of each trial is independent
Expected Value of a Binomial R.V is represented by E(X)=n*p
BINOMDIST
BINOMDIST is a built-in Excel function that gives values for the p.m.f and c.d.f of any binomial random variable
It is located under Statistical in the Function menu Syntax:
– BINOMDIST(number_s, trials, probability_s, cumulative) number_s = cell location of x trials = how many times you are performing experiment probability_s = probability of success cumulative = “false” for pmf; “true” for cdf
Review of Finite Random Variables
Finite R.V takes on a set of discrete values (you can list all of the numerical values)
Probability Mass Function (p.m.f) describes the probability distribution
– fx(x) where fx(x) = P( X = x )– graph is a histogram
sum of the heights of the rectangles must equal one
Cumulative Distribution Function (c.d.f)– FX(x) = P(X x)– graph is a step function
minimum is 0 and the maximum is 1
Review of Finite Random Variables
Binomial Random Variable is a random variable that stands for the number of successes in n Bernoulli Trials
– A Bernoulli Trial has only 2 possible outcomes: success and failure
Binomial Setting:– You have n repeated trials of an experiment– On a single trial, only two possible outcomes– The probability of success is the same from trial to trial– The outcome of each trial is independent
Expected Value is n(p), where p is the probability of success and n is the number of trials of the experiment
Continuous Random Variable
Continuous random variables take on values in an interval; you cannot list all the possible values
Examples: 1. Let X be a randomly selected number between 0 and 12. Let R be a future value of a weekly ratio of closing prices for IBM stock3. Let W be the exact weight of a randomly selected student
You can only calculate probabilities associated with interval values of X. You cannot calculate P(X=x); however we can still look at its c.d.f, FX(x).
Probability Density Function (p.d.f)
When we looked at finite random variables, we created a p.m.f graph (histogram)
Our graph had rectangles with a certain width This width was the distance between two
values of the random variable When we start to make our width smaller and
smaller, we begin to see a curve
Probability Density Function (p.d.f)
When we look at continuous random variables, we are looking at random variables that take on every value in a given interval
The width of our rectangles are now infinitesimally small When we look at this histogram, we are approximating our
p.d.f When we graph all of the values of the continuous r.v, our
p.d.f graph looks like a curver This graph is called the graph of the Probability Density
Function (p.d.f) Probability Density Function is represented by fX(x)
Probability Density Function
Below is an example of a p.d.f graph– Note: The notation for a pmf and a pdf are the same (fX(x)) –
you will need to be careful about the interpretation of the function
Aa b
fX
Probability Density Function (p.d.f)
For the graph of the p.m.f, the values along the y-axis (the probabilities) summed up to 1 The same holds true for the p.d.f graph The area under the curve adds up to 1 (because the area under the graph represents the total probability) Note: There is no one type of curve that you are looking for – there are different types of continuous random
variables so the graphs of the pdf will look different
How to tell if the graph is a p.d.f?
We use the word “curve” but the graph could be a straight line
We could also have a histogram that is approximating the p.d.f.
If the area under the graph is 1, then the graph represents a p.d.f.
If the graph is a histogram, how can you tell what function it represents?
– In the finite case, the sum of the heights of the rectangles add up to 1
– In the continuous case, the sum of the heights of the rectangles do add to 1 but the areas of the rectangles do sum up to 1
Probability Density Function (p.d.f)
For any continuous random variable, X, P(X=a)=0 for every number a.
Instead of considering what the probability of X is at a single value, we look for the probability that X assumes a value in an interval
P(a X b) is the probability that X assumes a value in [a,b]
Probability Density Function (p.d.f)
To find P(a X b), we need to look at the portion of the graph that corresponds to this interval.
A
a b
fX
Finding Values of the pdf
To find the probabilities associated with the pdf, you can calculate them in two ways– You can look at the area under the curve associated
with the inteval in question Do this when you are given the pdf function For example, look at #6 on the random variable worksheet
– You can use the cdf Do this when you are given the cdf function
Calculating P(a X b) from a p.d.f
( ) ( ) ( ) 1 since the
events are mutually exclusive
( ) 1 ( ) ( )
= 1 ( ) (1 ( )
= 1 ( ) 1 ( )
= (
P X a P a X b P b X
P a X b P X a P b X
P X a P X b
P X a P X b
P X b
) ( )
= ( ) ( )X X
P X a
F b F a
Cumulative Distribution Function
The same probability information is often given in a different form, called the cumulative distribution function, (c.d.f), FX
FX(x)=P(Xx)
0 FX(x) 1, for all x NOTE: Regardless of whether the random variable is
finite or continuous, the cdf, FX, has the same interpretation
– I.e., FX(x)=P(Xx)
Cumulative Distribution Function
For the finite case, our c.d.f graph was a step function
For the continuous case, our c.d.f. graph will be a continuous graph
Note: The minimum is still 0 and the maximum is still 1
Cumulative Distribution Function
0.00.20.40.60.81.01.2
-1 0 1 2 3t
F T(t )
Cumulative Distribution Function
Cumulative Distribution Function
0.000.200.400.600.801.001.20
-20 0 20 40 60 80 100t
F T(t )
• Now, depending on the type of continuous random variable, the graph of the cdf will look different
• Below is an example of a graph of a cdf for a continuous random variable
Review of Continuous Random Variables
Continuous R.V. takes on any value in a given interval; you cannot list all of the values
Probability Density Function (p.d.f.) describes the distribution of the probabilities
– fX(x) where fX(x) does not equal P( X = x )– fX(x) simply represents the height of the curve at a given value of
the random variable– We can only calculate the probabilities of intervals
to calcuate P(a X b) -- use the graph of the p.d.f and find the corresponding area under the curve OR calculate FX(b) - FX(a) if given the c.d.f
– P(X=a)=0 for every number a
Review of Continuous Random Variables
Cumulative Distribution Function (c.d.f)– FX(x) = P(X x)– graph is an increasing function with minimum at 0 and
maximum at 1 Note! At every new value of a R.V. (finite or
continuous), a c.d.f adds on the associated probability of the new value of the R.V
– for finite R.V., it looks like a step funciton since there are only a finite amount of number
– for continuous R.V., it a continuous increasing function both graphs have minimum at 0 and maximum at 1
Special Types of Continuous R.V.
Exponential random variables usually describe the waiting time between consecutive events.
In general, the p.d.f and c.d.f for an exponential random variable X is given as follows:
(pronounced alpha) is a Greek letter – it represents a number in the formula
Remember! P(a<X<b) = FX(b) - FX(a) AND P(X=a)=0 because an exponential random variable is a continuous random variable
xe
xxF xX 0if1
0if0)( /
xe
xxf xX 0if
10if0
)( /
Continuous R.V. with exponential distribution
Probability Density Function
0.00.10.20.30.40.50.6
-3 0 3 6 9 12 15x
f X (x )
Cumulative Distribution Function
0.00.20.40.60.81.01.2
-3 0 3 6 9 12 15x
F X (x )
Special Types of Continuous R.V.
If the probability that X assumes a value is the same for all equal subintervals of an interval [0,u], then we have a uniform random variable, where u is the interval length
X is equally likely (probabilities are equal) to assume any value in [0,u]
If X is uniform on the interval [0,u], then we have the following formulas:
0 if 0
1( ) if 0
0 if
X
x
f x x uu
u x
0 if 0
( ) if 0
1 if
X
x
xF x x u
uu x
Continuous R.V. with uniform distribution
Probbility Density Function
0.0000
0.0004
0.0008
0.0012
0.0016
-100 0 100 200 300 400 500 600 700 800
x
f X (x )
Cumulative Distribution Function
0.0
0.2
0.4
0.6
0.8
1.0
-100 0 100 200 300 400 500 600 700 800
x
F X (x )
Expected Value
From Project 1, Expected Value of a Finite Random Variable is
This can now be written as This is called the mean of X It is denoted by X
For a Binomial Random Variable, E(X)=n*p, where n is the the number of independent trials and p is the probability of success
xall
)( xXPx
x
X xfxXEall
)()(
Expected Value
If X is continuous, you cannot sum over all the values of X, since P(X=x)=0 for all x
In general, if X is a continuous random variable with a UNIFORM distribution on [0,u], then
Any EXPONENTIAL random variable X, with parameter , has
( )2
uE X
( )E X
FOCUS ON THE PROJECT
GOAL: To price a European call option on the option’s starting date
For our project, we are using several Random Variables
– C, the closing price per share– R, the ratio of closing prices – Rm is the mean of the ratios of closing prices– Rnorm is the continuous r.v. of normalized ratios– Rnorm = R – (Rm-Rrf)
Focus on the project
Use ratios to estimate the basic volatility of stock Normalize ratios first (IMPORTANT!)
– Why? Want to compare how the stock is doing to what the money is doing in bank (at risk-free rate)
– From each ratio, you are going to subtract out the growth rate of the stock but leave the trend (thus making the growth rate 0)
– To each ratio, you are going to add in the carrying cost – the growth at the risk-free rate (this is from assumption number 4)
Focus on the project
How to normalize? Adjust observed ratios so average is same as risk-free weekly ratio
I.e., reduce observed ratios by the difference Rm-Rrf
Now, recall that Rnorm = R – (Rm-Rrf) Note, the average value of normalized ratios is
Rrf= Rm-(Rm-Rrf)
What should you do?
Since you have all of your ratios (found for homework #6), you should normalize each of them.– I.e, For each ratio that you have, you will need to
subtract Rm-Rrf from each ratio R. – This gives you a Rnorm for each ratio
To do this:– You will need to find the mean of the ratios– Use the weekly ratio at the risk-free rate