Agenda Course 02402 Introduction to Statistics Continuous random - - PowerPoint PPT Presentation

agenda course 02402 introduction to statistics
SMART_READER_LITE
LIVE PREVIEW

Agenda Course 02402 Introduction to Statistics Continuous random - - PowerPoint PPT Presentation

Agenda Course 02402 Introduction to Statistics Continuous random variables and distributions 1 The Density Function The Distribution Function Lecture 3: Continuous Distributions The Mean of a Continuous Stochastic Variable The Variance of a


slide-1
SLIDE 1

Course 02402 Introduction to Statistics Lecture 3: Continuous Distributions Per Bruun Brockhoff

DTU Informatics Building 305 - room 110 Danish Technical University 2800 Lyngby – Denmark e-mail: pbb@imm.dtu.dk

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 1 / 33

Agenda

1

Continuous random variables and distributions The Density Function The Distribution Function The Mean of a Continuous Stochastic Variable The Variance of a Continuous Stochastic Variable

2

Specific Statistical Distributions The Normal Distribution

Example 1 Example 2 Example 3 Example 4 Example 5: Approximation of the binomial distribution

The Log-Normal Distribution

Example 6

The Uniform Distribution

Example 7

3

R (R Note section 4 )

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 2 / 33 Continuous random variables and distributions The Density Function

The Density Function The density function for a stochastic variable is denoted by f(x) f(x) says something about the frequency of the

  • utcome x for the stochastic variable X

The density function for continuous variables does not correspond to the probability, that is f(x) = P(X = x) A nice plot of f(x) is a histogram

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 4 / 33 Continuous random variables and distributions The Density Function

The Density Function for Continuous Variables The density function for a continuous variable is written as: f(x) The following is valid: f(x) > 0 for x ∈ S f(x) = 0 for x ∈ S ∞

−∞

f(x)dx = 1

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 5 / 33

slide-2
SLIDE 2

Continuous random variables and distributions The Distribution Function

The Distribution Function The distribution function for a continuous stochastic variable is denoted by F(x). The distribution function corresponds to the cumulative density function: F(x) = P(X ≤ x) F(x) = x

t=−∞

f(t)dt A nice plot of F(x) is the cumulative distribution plot

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 6 / 33 Continuous random variables and distributions The Mean of a Continuous Stochastic Variable

The Mean of a Continuous Stochastic Variable The mean of a continuous stochastic variable is calculated as: µ =

  • S

x · f(x)dx where S is the sample space of X

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 7 / 33 Continuous random variables and distributions The Variance of a Continuous Stochastic Variable

The Variance of a Continuous Stochastic Variable The variance of a continuous stochastic variable is calculated as: σ2 =

  • S

(x − µ)2 · f(x)dx where S is the sample space of X

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 8 / 33 Specific Statistical Distributions

Specific Statistical Distributions A number of statistical distributions exist that can be used to describe and analyze different kind of problems Now we consider continuous distributions

The normal distribution The log-normal distribution The uniform distribution

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 10 / 33

slide-3
SLIDE 3

Specific Statistical Distributions The Normal Distribution

The Normal Distribution

−5 −4 −3 −2 −1 1 2 3 4 5 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 The Normal Distribution x Density, f(x)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 11 / 33 Specific Statistical Distributions The Normal Distribution

The Normal Distribution X ∼ N(µ, σ2) Density function: f(x) =

1 σ √ 2πe− (x−µ)2

2σ2

Mean value: µ = µ Variance: σ2 = σ2 Table 3 for F(x)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 12 / 33 Specific Statistical Distributions The Normal Distribution

The Normal Distribution

−5 −4 −3 −2 −1 1 2 3 4 5 −0.05 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 −2σ −σ µ −3σ 3σ 2σ σ x Density, f(x) The Normal Distribution N(0,1 2 )

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 13 / 33 Specific Statistical Distributions The Normal Distribution

The Normal Distribution

−5 5 10 −0.05 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 N(0,12) N(5,12) Comparison of two normal distributions with different means and same variance

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 14 / 33

slide-4
SLIDE 4

Specific Statistical Distributions The Normal Distribution

The Normal Distribution

−10 −8 −6 −4 −2 2 4 6 8 10 0.1 0.2 0.3 0.4 0.5 Comparison of three normal distributions with same mean and different variance x Density, f(x)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 15 / 33 Specific Statistical Distributions The Normal Distribution

The Normal Distribution A normal distribution with mean value 0 and variance 1, that is: Z ∼ N(0, 12) is called the standard normal distribution An arbitrary normally distributed variable X ∼ N(µ, σ2) can be standardized by Z = X − µ σ

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 16 / 33 Specific Statistical Distributions The Normal Distribution

Example 1 A weight has a measurement error, E, that can be described by a standard normal disrtribution, i.e. E ∼ N(0, 12) that is, mean µ = 0 and standard deviation σ = 1 gram. We now measure the weight of a single piece a) What is the probability that the weight measures at least 2 grams too little?

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 17 / 33 Specific Statistical Distributions The Normal Distribution

Example 1 b) What is the probability that the weight measures at least 2 grams too much? c) What is the probability that the weight measures at most ±1 gram wrong?

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 18 / 33

slide-5
SLIDE 5

Specific Statistical Distributions The Normal Distribution

Example 2 It is assumed that among a group af elementary school teachers, the salary distribution can be described as a normal distribution with mean µ = 280.000 and standard deviation σ = 10.000. a) What is the probability that a randomly selected teacher earns more than 300.000?

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 19 / 33 Specific Statistical Distributions The Normal Distribution

Example 3 It is assumed that among a group af elementary school teachers, the salary distribution can be described as a normal distribution with mean µ = 290.000 and standard deviation σ = 4.000. a) What is the probability that a randomly selected teacher earns more than 300.000?

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 20 / 33 Specific Statistical Distributions The Normal Distribution

Example 4 It is assumed that among a group af elementary school teachers, the salary distribution can be described as a normal distribution with mean µ = 290.000 and standard deviation σ = 4.000. a) Give the salary interval that covers 95% of all teachers’ salary

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 21 / 33 Specific Statistical Distributions The Normal Distribution

Example 5: Approximation of the binomial distribution In a dose-response experiment with 80 rats, it is assumed that the probability that a rat survives the experiment is p = 0.5. a) What is the probability that at most 30 rats die in the experiment? b) What is the probability that between 38 and 42 rats die in the experiment?

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 22 / 33

slide-6
SLIDE 6

Specific Statistical Distributions The Log-Normal Distribution

The Log-Normal Distribution X ∼ LN(α, β) Density function: f(x) =

  • 1

β √ 2πx−1e−(ln(x)−α)2/2β2 x > 0, β > 0

  • therwise

Mean: µ = eα+β2/2 Variance: σ2 = e2α+β2(eβ2 − 1)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 23 / 33 Specific Statistical Distributions The Log-Normal Distribution

The Log-Normal Distribution

5 10 15 20 25 30 0.05 0.1 0.15 0.2 0.25 LN(1,1) x Density, f(x) The Log−Normal Distribution LN(1,1)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 24 / 33 Specific Statistical Distributions The Log-Normal Distribution

The Log-Normal Distribution A log-normally distributed variable Y ∼ LN(α, β) can be transformed into a standard normally distributed variable X by: X = ln(Y ) − α β and then: X ∼ N(0, 12)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 25 / 33 Specific Statistical Distributions The Log-Normal Distribution

Example 6 The particle size (µm) in a compoundi is assumed to follow a Log-normal distribution. We have the oberservations: 2.2 3.4 1.6 0.8 2.7 3.3 1.6 2.8 1.9 We take the logarithm of the data and achieve: 0.8 1.2 0.5

  • 0.2 1.0 1.2 0.5 1.0 0.6

from which we get: ¯ x = 0.733 and s = 0.44. What is the proportion of particles with a size in the interval [2; 3]

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 26 / 33

slide-7
SLIDE 7

Specific Statistical Distributions The Log-Normal Distribution

Example 6

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 27 / 33 Specific Statistical Distributions The Uniform Distribution

The Uniform Distribution X ∼ U(α, β) Density function: f(x) = 1 β − α Mean: µ = α+β

2

Variance: σ2 = 1

12(β − α)2

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 28 / 33 Specific Statistical Distributions The Uniform Distribution

The Uniform Distribution

3.5 4 4.5 5 5.5 0.2 0.4 0.6 0.8 1 x Density, f(x) The Uniform Distribution U(4,5)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 29 / 33 Specific Statistical Distributions The Uniform Distribution

Example 7 Students in a course arrive to a lecture between 7.45 and 8.15. It is assumed that the arival times can be described by a uniform distribution. What is the probability that a randomly selected student arrives between 8.05 and 8.15?

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 30 / 33

slide-8
SLIDE 8

R (R Note section 4 )

R (R Note section 4 ) R Distribution norm The normal distribution unif The uniform distribution lnorm The log-normal distribution exp The exponential distribution d Density function f(x). p Distribution function F(x). q Quantile of distribution. Example: P(Z ≤ 2) > pnorm(2)

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 32 / 33 R (R Note section 4 )

Agenda

1

Continuous random variables and distributions The Density Function The Distribution Function The Mean of a Continuous Stochastic Variable The Variance of a Continuous Stochastic Variable

2

Specific Statistical Distributions The Normal Distribution

Example 1 Example 2 Example 3 Example 4 Example 5: Approximation of the binomial distribution

The Log-Normal Distribution

Example 6

The Uniform Distribution

Example 7

3

R (R Note section 4 )

Per Bruun Brockhoff (pbb@imm.dtu.dk) Introduction to Statistics, Lecture 3 Fall 2012 33 / 33