• No results found

Sampling Distributions of Sample Means

N/A
N/A
Protected

Academic year: 2022

Share "Sampling Distributions of Sample Means"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

Sampling Distributions of Sample Means

Figure 7‐1  Distributions of average scores  from throwing dice.  

Mean = (6+1)/2=3.5

Sigma^2 = [(6‐1+1)2‐1]/12=2.92 Sigma=1.71

Sec 7‐2 Sampling Distributions and the 

Central Limit Theorem 1

(2)

0 2 4 6 0

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

1 2 3 5 10

0 2 4 6

10-4 10-3 10-2 10-1 100

1 2 3 5 10

(3)

Descriptive statistics:

Point estimation:

(4)

Point Estimation

• A sample was collected: X

1

, X

2

,…, X

n

• We suspect that sample was drawn from a  random variable distribution f(x)

• f(x) has k parameters that we do not know

• Point estimates are estimates of the parameters of the 

f(x) describing the population based on the  sample

– For exponential  PDF: f(x)=λexp(‐λx) one wants to estimate λ – For Bernoulli PDF: px(1‐p)1‐xone wants to estimate p

– For normal PDF one wants to estimates both μ and σ

• Point estimates are uncertain: therefore we can talk of 

averages

and standard deviations of point estimates

Sec 7‐1 Point Estimation 4

(5)

Point Estimator

Sec 7‐1 Point Estimation 5

A point estimate of some parameter 𝜃 describing population random variable is a single numerical value 𝜃 depending on all values 𝑥 , 𝑥 , . . . 𝑥 in the sample.

The sample statistic whis a random variable Θ defined by a function Θ X , X , . . . 𝑋 is called the

point estimator.

• There could be multiple choices for the point estimator of a parameter.

• To estimate the mean of a population, we could choose the:

– Sample mean – Sample median

– Peak of the histogram

– ½ of (largest + smallest) observations of the sample.

• We need to develop criteria to compare estimates using statistical  properties.

(6)

Unbiased Estimators Defined

Sec 7‐3.1 Unbiased Estimators 6

(7)

Bias vs Noise

(8)

Mean Squared Error

Sec 7‐3.4 Mean Squared Error of an 

Estimator 8

(9)

Credit: XKCD  comics 

(10)

Methods of Point Estimation

• We will cover two popular methodologies to  create point estimates of a population 

parameter.

– Method of moments

– Method of maximum likelihood

• Each approach can be used to create estimators  with varying degrees of biasedness and relative  MSE efficiencies.

Sec 7‐4 Methods of Point Estimation 10

(11)

Method of moments for 

point estimation

(12)

What are moments?

• A p‐th population moment of a random variable is  the expected value E(X

p

)

– First moment: 

– Second moment:  

– Second moment: 

– A population moment relates to the entire population 

• A sample moment is calculated like its population  moments but for a finite sample

– Sample first moment = sample mean =  – Sample p‐th moment  

Sec 7‐4.1 Method of Moments 12

(13)

Moment Estimators

Sec 7‐4.1 Method of Moments 13

(14)

Exponential Distribution: Moment Estimator‐1

st 

moment 

• Suppose that x

1

, x

2

, …, x

n

is a random sample  from an exponential distribution f(x)=λexp(‐λx)  with parameter λ.

• There is only one parameter to estimate, so 

equating population and sample first moments,  we have one equation: E(X) =  .

• E(X) = 1/λ thus 

λ = 1/ is the 1

st

moment estimator.

Sec 7‐4.1 Method of Moments 14

(15)

Matlab exercise

• Generate 100,000 exponentially distributed  random numbers with λ=3: f(x)=λexp(‐λx) 

– Use random('Exponential’…) but read the manual to  know how to introduce parameters.

• Get a moment estimate of lambda based on  the 1

st

moment 

• Get a moment estimate of lambda based on  the 2

nd

moment 

– Second moment of the exponential distribution is E(X2) =  E(X)2+Var(X)= 1/λ2 + 1/λ2 = 2/λ2

• Get a moment estimate of lambda based on  the 3

rd

moment 

– Second moment of the exponential distribution is E(X3) =  3!/λ3= 6/λ3. Most generally, E(Xp) = p!/λp

(16)

How I solved it

• Stats=100000; 

• Y=random('Exponential', 1/3, Stats, 1);

%parametrization in MATLAB is 1/lambda

• 1/mean(Y) %matching the first moment

% ans = 3.0086

• sqrt(2/mean(Y.^2)) %matching the second  moment

% ans = 3.0081

• (6/mean(Y.^3))^(1./3) %matching the third 

moment

(17)

Credit: XKCD  comics 

(18)

Method of Maximum Likelihood 

for point estimation

(19)
(20)

Maximum Likelihood Estimators

• Suppose that X is a random variable with probability  distribution f(x, θ), where θ is a single unknown 

parameter.  Let x1, x2, …, xn be the observed values in a  random sample of size n.  Then the likelihood function of  the sample is the probability to get it in a random 

variable with PDF f(x, θ):

L(θ) = f(x1, θ) ∙ f(x2, θ) ∙…∙ f(xn , θ) (7‐9)

• Note that the likelihood function is now a function of 

only the unknown parameter θ.  The maximum likelihood  estimator (MLE) of θ is the value of θ that maximizes the  likelihood function L(θ).

• Usually it is easier to work with logarithms: l(θ) = ln L(θ) 

Sec 7‐4.2 Method of Maximum Likelihood 20

(21)
(22)
(23)

Example 7‐11: Exponential MLE

Let X be a exponential random variable with parameter λ.  The  likelihood function of a random sample of size n is:

Sec 7‐4.2 Method of Maximum Likelihood 23

𝐿 𝜆 𝜆𝑒 𝜆 𝑒

ln 𝐿 𝜆 𝑛 ln 𝜆 𝜆 𝑥

𝑑 ln 𝐿 𝜆 𝑑𝜆

𝑛

𝜆 𝑥 0

𝜆 𝑛

𝑥

1

𝑋 same as moment estimator

(24)
(25)
(26)

Example 7‐9: Bernoulli MLE

Let X be a Bernoulli random variable.  The probability mass 

function is f(x;p) = px(1‐p)1‐x, x = 0, 1 where P is the parameter  to be estimated.  The likelihood function of a random sample  of size n is:

Sec 7‐4.2 Method of Maximum Likelihood 26

𝐿 𝑝 𝑝 1 𝑝 ⋅ 𝑝 1 𝑝 ⋅. . .⋅ 𝑝 1 𝑝

𝑝 1 𝑝 𝑝 1 𝑝

ln 𝐿 𝑝 𝑥 ln 𝑝 𝑛 𝑥 ln 1 𝑝

𝑑 ln 𝐿 𝑝 𝑑𝑝

𝑥

𝑝

𝑛 𝑥

1 𝑝 0

𝑝̂ 𝑥 𝑛

(27)
(28)
(29)

Example 7‐10: Normal MLE for μ

Let X be a normal random variable with unknown mean μ and  variance σ2.  The likelihood function of a random sample of  size n is:

Sec 7‐4.2 Method of Maximum Likelihood 29

𝐿 𝜇 1

𝜎 2𝜋 𝑒 1

2𝜋𝜎 𝑒

ln 𝐿 𝜇 𝑛

2 ln 2𝜋𝜎 1

2𝜎 𝑥 𝜇

𝑑 ln 𝐿 𝜇 𝑑𝜇

1

𝜎 𝑥 𝜇 0

𝜇 𝑥

𝑛 𝑋 same as moment estimator

(30)

Example 7‐11: Normal MLE for σ

2

Let X be a normal random variable with the estimate of mean μ determined by MLE (see the previous slide) and an unknown 

variance σ2.  The likelihood function of a random sample of size n is:

Sec 7‐4.2 Method of Maximum Likelihood 30

𝐿 𝜎 1

𝜎 2𝜋 𝑒 1

2𝜋𝜎 𝑒

ln 𝐿 𝜎 𝑛

2 ln 2𝜋𝜎 1

2𝜎 𝑥 𝜇

𝑑 ln 𝐿 𝜎 𝑑𝜎

𝑛 𝜎

1

𝜎 𝑥 𝜇 0

𝜎 𝑥 𝜇

𝑛 biased estimator

(31)

Credit: XKCD  comics 

References

Related documents

shapes of the AGN and star formation IR SEDs (see blue dashed and red solid curves in Fig. 2 ), which results in sources with a signif- icant contribution from the AGN component

This model posits four types of health beliefs that affect an individual’s health behavior, in this case, the decision to seek mental health services: perceived

Legal norms that sanction the implementation of the merit principle in the civil service, predict a special protection for the main personnel of the public

Information Governance in NHSScotland: A Competency Framework is all about making the best use of resources to provide education and training opportunities that will help staff

After talking with the voice faculty, we have decided that the courses listed in our Master of Music degree proposal (French II, German II, and Italian II) should be replaced

3This result is explained by the fact that under Bertrand competition foreign investment in R&D has a negative (indirect) strategic effect on foreign firms'

Game referred to in the second column in the affected Magisterial Districts referred to in the third column, excluding the Magisterial Districts referred to in the fourth.. column

Second, very little use of Hymenoptera as a host group is found among Braconidae (only the small subfamily Ichneutinae and a few ectopar- asitoids in the subfamilies