1 / 18

Statistics

Statistics. Statistics: 1. Model 2. Estimation 3. Hypothesis test.            . Estimation Estimat. Definition:

chip
Download Presentation

Statistics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Statistics Statistics: 1. Model 2. Estimation 3. Hypothesis test lecture 7

  2.             . . . . . . EstimationEstimat Definition: A (point) estimate of a parameter, , in the model is a “guess”at what can be (based on the sample). The corresponding random variable Q is called an estimator. ^ ^ parameter estimat estimator Sample Population ^   lecture 7

  3. EstimationUnbiased estimate Definition: An estimator Q is said to be unbiased if E(Q) = q ^ ^ lecture 7

  4. Confidence interval for the mean • Example: • In a sample of 20 chocolate bars the amount of calories has been measured: • the sample mean is 224 calories • How certain are we that the population mean  is close to 224? • The confidence interval (CI) for m helps us here! lecture 7

  5. Confidence interval for Known variance Let x be the average of a sample consisting of n observations from a population with mean  and variance 2 (known). A (1-)100% confidence interval for  is given by From the standard normal distribution N(0,1) • We are (1-)100% confidentthat the unknown parameter  lies in the CI. • We are (1-)100% confidentthat the error we make by using x as an estimate of  does not exceed (from which we can find n for a given error tolerance). lecture 7

  6. Confidence interval for Known variance • Confidence interval for known variance is a results of the • Central Limits Theorem.The underlying assumptions: • sample size n > 30, or • the corresponding random var. is (approx.) normally distributed • (1 - )100% confidence interval : • typical values of :  =10% ,  = 5% ,  = 1% • what happens to the length of the CI when n increases? lecture 7

  7. Confidence interval for Known variance • Problem: • In a sample of 20 chocolate bars the amount of calories has been measured: • the sample mean is 224 calories • In addition we assume: • the corresponding random variable is approx. normally distributed • the population standard deviation  = 10 • Calculate 90% and 95% confidence interval for  • Which confidence interval is the longest? lecture 7

  8. Confidence interval for Unknown variance Let x be the mean and s the sample standard deviation of a sample of n observations from a normal distributed population with mean  and unknown variance. A (1-)100 % confidence interval for  is given by From the t distribution with n-1 degrees of freedom t(n -1) • Not necessarily normally distributed, just approx. normal distributed. • For n > 30 the standard normal distribution can be used instead of the t distribution. • We are (1-)100% confidentthat the unknown  lies in the CI. lecture 7

  9. Confidence interval for Unknown variance • Problem: • In a sample of 20 chocolate bars the amount of calories has been measured: • the sample mean is 224 calories • the sample standard deviation is 10 • Calculate 90% and 95% confidence intervals for  • How does the lengths of these confidence intervals compare to those we obtained when the variance was known? lecture 7

  10. Confidence interval for Using the computer • MATLAB: If x contains the data we can obtain a (1-alpha)100%confidence interval as follow: • mean(x) + [-1 1] * tinv(1-alpha/2,size(x,1)-1) * std(x)/sqrt(size(x,1)) • where • size(x,1)is the size n of the sample • tinv(1-alpha/2,size(x,1)-1) = ta/2(n-1) • std(x) = s (sample standard deviation) • R: • mean(x) + c(-1,1) * qt(1-alpha/2,length(x)-1) * sd(x)/sqrt(length(x)) lecture 7

  11. Confidence interval for s2 • Example: • In a sample of 20 chocolate bars the amount of calories has been measured: • sample standard deviation is10 • How certain are we that the population variance2 is close to 102? The confidence interval for 2 helps us answer this! lecture 7

  12. Confidence interval for s2 Let s be the standard deviation of a sample consisting of n observations from a normal distributed population with variance 2. A (1-) 100% confidence interval for 2 is given by From 2 distribution with n-1 degrees of freedom We are (1-)100%confident that the unknown parameter 2 lies in the CI. lecture 7

  13. Confidence interval for s2 • Problem: • In a sample of 20 chocolate bars the amount of calories has been measured: • sample standard deviation is10 • Find the 90% and 95% confidence intervals for s2 lecture 7

  14. Confidence interval for s2Using the computer MATLAB: If x contains the data we can obtain a (1-alpha)100%confidence interval for s2 as follow: (size(x,1)-1)*std(x)./ chi2inv([1-alpha/2 alpha/2],size(x,1)-1) R: (length(x)-1)*sd(x))/ qchisq(c(1-alpha/2,alpha/2), length(x)-1) lecture 7

  15. Maximum Likelihood EstimationThe likelihood function Assume that X1,...,Xnare random variables with joint density/probability function where q is the parameter (vector) of the distribution. Considering the above function as a function of q given the data x1,...,xnwe obtain the likelihood function lecture 7

  16. Maximum Likelihood EstimationThe likelihood function Reminder: If X1,...,Xnare independent random variables with identical marginal probability/ density function f(x;q), then the joint probability / density function is Definition: Given independent observations x1,...,xnfrom the probability / density function f(x;q) the maximum likelihood estimate (MLE) q is the value of q which maximizes the likelihood function lecture 7

  17. Maximum Likelihood EstimationExample Assume that X1,...,Xnare a sample from a normal population with mean m and variance s2. Then the marginal density for each random variable is Accordingly the joint density is The logarithm of the likelihood function is lecture 7

  18. Maximum Likelihood EstimationExample We find the maximum likelihood estimates by maximizing the log-likelihood: which implies . For s2 we have which implies Notice , i.e. the MLE is biased! lecture 7

More Related