Title: OCE301 Part VI: Data Analysis
1OCE301 Part VI Data Analysis Probability
Theorylecture 2
2Random Variables
The quantity that we observe in an experiment is
called a random variable ( or stochastic
variable) because the value it will assume in
the next trial depends on chance, on randomness.
Example
If we roll a dice, we get one of the numbers
from 1 to 6, but we dont know which one will
show up next.
3Definition Random Variable
Use probability function to characterize a random
variable
4Rolling a Fair Die
Probability mass function
discrete random variable
Total probability is equal to 1
5Rotating an Unbiased Disk
angle q to which the indicator points
Probability density function
continuous random variable
Total probability is equal to 1
6Cumulative Distribution Function
Cumulative distribution function (cdf)
7Fundamental Probability Functions
Cumulative distribution function (cdf)
X random variable
x fixed number
Probability of exceedance (poe)
Probability density function (pdf)
8Problem Set 22.5 (No. 17)
1
0.1
0.9
9Mean, Variance Discrete r.v.
mean
Probability mass function
variance
10Mean, Variance Continuous r.v.
mean
Probability density function
variance
11Expectation and Moments
mathematical expectation
kth moment
kth central moment
12Uniform Distribution
a
b
13Uniform Distribution
f (x)
x
a
b
14Problem Set 22.6 (No. 1)
1
15Normal (Gaussian) Density Function
m mean
s standard deviation
16Normal Density Function
mu0 sigma1 x-40.014 psd1/(sqrt(2pi)sigm
a)exp(-1/2((x-mu)/sigma).2) plot(x,psd)
axis(-4,4,0,0.5) grid
17Standard Normal pdf (various s)
s 1
s 2
18Normal Distribution Function
(Cumulative) normal distribution function
tabulated in many textbooks
(normal table)
Use of the normal table
19Normal Table (page A89)
20Standard Normal pdf/cdf Plot
pdf
cdf
21Error Function
Matlab Error function.
Y erf(X) is the error function for each element
of X. X must be real. The error function is
defined as erf(x) 2/sqrt(pi)
integral from 0 to x of exp(-t2) dt.
22Normal Table from Error Function
23Matlab Verifications
Matlab verifications
gtgt 0.5(1erf(1/sqrt(2))) ans 0.8413 gtgt
0.5(1erf(2/sqrt(2))) ans 0.9772 gtgt
0.5(1erf(3/sqrt(2))) ans 0.9987
24Matlab Function phi.m
function xphi(z) -------------------------------
------ cdf of the standardized normal
distribution (normal table) ---------------------
---------------- if zlt0 t0.5(1erf(-z/sqrt(2)
)) x1-t else x0.5(1erf(z/sqrt(2))) en
d
25Sigma-limits
26Intervals of Certain Probability
gtgt erf(1.96/sqrt(2)) ans 0.9500 gtgt
erf(2.58/sqrt(2)) ans 0.9901 gtgt
erf(3.29/sqrt(2)) ans 0.9990
27Problem Set 22.8 (No. 1a)
Let X be normal with mean 10 and variance 4. Find
P(X gt 12)
28Problem Set 22.8 (No. 1d)
Let X be normal with mean 10 and variance 4. Find
P(9 lt X lt 13)