STAT 211 Topic 4

From Notes
Jump to navigation Jump to search

Lecture 8

Lecture 8 Notes

« previous | Thursday, February 10, 2011 | next »


World series: 2 teams Ends when winning team wins 4 games

Evenly matched (λ = .5)

Continuous Random Variables

Probability density function (PDF)

Distribution (PDF) is the smooth curve that fits over a histogram.

Comparable to PMF for discrete random variables:

  • Area under PDF histogram should equal 1
  • PDF is always positive (≥ 0)
Note: P(X=c)=0 for any constant c, so inclusive/exclusive ranges do not matter

P(a≤X≤b)=∫abf(x) dx


Uniform distribution

Simplest PDF f as a straight horizontal line: f(x)={1B−AA≤x≤B0otherwise

Area under line should be 1.

Cumulative distribution function (CDF)

"Sum" (integral) of all PDFs for random variable X, except continuous (no jumps between probabilities):

F(x)=P(X≤x)=∫−∞xf(y) dy

PDF is derivative of CDF:

f(x)=dFdx

Example

Suppose a random variable X has PDF f(x)={0.5x0≤x≤20otherwise

What is P(0.5≤X≤1.3)?

∫0.51.30.5x dx=0.25x2|0.51.3=0.25(1.32−0.52)


Lecture 9

Lecture 9 Notes

Tuesday, February 15, 2011

Expected Value

Expected value of Continuous Random Variable is:

E(X)=∫−∞∞xf(x) dx


Variance

Variance of a Continuous random variable is:

V(X)=∫−∞∞(x−μ)2f(x) dxμ=E(X)

Also equivalent to:

V(X)=E(X2)−(E(X))2

Note: when plugging X2 into Expected Value function, do not put it into the PDF function

Example

f(x)={k[1−(x−3)2]2≤x≤40otherwise

E(X)=∫24x⋅k[1−(x−3)2] dxE(X2)=∫x4x2⋅k[1−(x−3)2] dx


Percentiles

  • Medain: What is a such that F(a)=0.5?
  • Q1 (25th percentile): What is a such that F(a)=0.25?
  • Q3 (75th percentile): What is a such that F(a)=0.75?
  • in general: (100pth percentile): What is a such that F(a)=p?


Normal Distribution

For normal distributions,

  • μ will be used for mean and median on symmetric unimodal curve
  • σ2 will be used for variance

"Gaussian Distribution"

f(x)=12πσe−(x−μ)22σ2−∞≤x≤∞

Written: X∼N(μ,σ2)

Special Case: Normal distribution with μ = 0 and σ = 1 is called Standard Normal distribution: Z∼N(0,1)

Curve of this function is called a Z-curve

CDF of standard normal random variable Z is Φ(z)=P(Z≤z)

Lecture 10

Lecture 10 Notes

Thursday, February 17, 2011

Topic: How to you get P(X<3) when X∼N(−1,10)?

Probabilities using the Z-Curve

Given:

  • P(Z≤−1.5)=Φ(−1.5)=0.067
  • P(Z≤2.5)=Φ(2.5)=0.994

We can find:

  • P(−1.5≤Z≤2.5)=Φ(2.5)−Φ(−1.5)
  • P(−2.5≤Z)=Φ(2.5) (symmetric around 0)
  • P(−2.5≤Z≤1.5)=Φ(2.5)−Φ(−1.5)

Generalization: for any z, Φ(z)=1−Φ(−z)

Percentile of Standard Normal Distribution

Φ(2.33)=0.99 implies 2.33 is 99th percentile.

Therefore, -2.33 is 1st percentile.


α Notation

From now on, let zα represent a number such that α is the area under the Z-curve to the right of zα.

In other words, zα is the ((1 − α) × 100)th percentile.

From previous example, z0.01=2.33


Standardization

Caclculating Standard Normal Distribution from Standard Distribution:

  1. if X is normal rv and Y=aX+b(a≠0), Y is also normal rv.
  2. E(Y)=a×μ+b and V(Y)=a2×σ2. Therefore Y∼N(aμ+b,a2σ2)
X∼N(μ,σ2)X=σZ+μZ=X−μσ

Example 1

X∼N(60,122)

P(72<X<90)=P(72−6012<X−6012<90−6012)=P(1<Z<2.5)=Φ(2.5)−Φ(1)


Example 2

X∼N(10,4)

X=2Z+10

5th Percentile = ?

  1. Find 95th percentile of Z: what z satisfies Φ(z)=0.95? (suppose 1.96)
  2. Find 5th percentile of Z: -1.96
  3. Plug in 5th percentile of Z into formula for X


Empirical Rule

  1. Roughly 68% of values are within 1 standard deviation (σ) of the mean (μ)
  2. Roughly 95% of values are within 2 standard deviations (2σ) of the mean (μ)
  • (1) states that P(μ−σ<X<μ+σ)=P(−1<Z<1)=0.68
  • This implies that the tails on either side are 1−0.682=0.16
  • Therefore Φ(1)=1−0.16=0.84

Gamma Distribution

How long do you expect to wait to have α many events happening, if the events are happening with a Poisson distribution with a rate of 1β
given α,β>0, PDF is:
f(x)={1Γ(α)βαxα−1e−x/βx>00otherwise
Γ(α)≈α!

Expected Value

E(X)=αβ

Variance

V(X)=αβ2

Bonus Continuous Distributions

Lognormal Distribution
If log⁡(X) is a normal distribution.



Summary of Distributions

We've learned:

  • Bernoulli (0,1)
  • Binomial (X ~ Bin(n, k))
  • Poisson
  • Uniform
  • Normal
  • Lognormal

Most situations in nature can be approximated using one of these distributions


Exercises

If a bolt of thread length is normally distributed, what is the probability that the length of a randomly selected bolt is:

  • within 1.5 standard deviations of its mean value?
    P(−1.5σ+μ<X<1.5σ+μ)=P(−1.5<Z<1.5)=Φ(1.5)−Φ(−1.5)=Φ(1.5)−(1−Φ(1.5))
  • farther than 2.5 standard deviations of its mean value?
    P(X<μ−2.5σ∨X>μ+2.5σ)=P(Z<−2.5∨Z>2.5)=2(1−Φ(2.5))