* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Estimation-Confidence intervals
History of statistics wikipedia , lookup
Degrees of freedom (statistics) wikipedia , lookup
Bootstrapping (statistics) wikipedia , lookup
Confidence interval wikipedia , lookup
Taylor's law wikipedia , lookup
Foundations of statistics wikipedia , lookup
Statistical hypothesis testing wikipedia , lookup
Misuse of statistics wikipedia , lookup
Estimation-Confidence intervalsHypothesis testing Population and sampling Population: is the total set of entities under study. example: the height of men, stock prices, all employees of a firm etc. Usually it is impossible to survey/measure the entire population because not all members are observable. If it is possible to measure the entire population it is often costly to do so and would take a great deal of time. Sample: is a subset of the population. The sample is used to develop hypotheses about the population under study. Researchers focus their analysis on the sample because of the difficulty of studying the entire population. There are many ways to select a sample and the study of this is called sampling theory. A commonly used method is called Random Sampling Sampling distribution of the mean A sampling distribution of the mean can be thought of as a relative frequency distribution of sample means first randomly select several samples from a population, then compute the mean of each sample. the relative frequency distribution of all the sample means is the sampling distribution of the mean Example: let the 5 employees of the firm A be the population under investigation. Each employee works specific hours per week. The following table demonstrates the hours of work per week of each employee. Employees 1. Dunn Hours 22 2. Hardy 26 3. Kiers 30 4. Malinowski 26 5. Tillman 22 Sampling distribution of the mean Samples of 2 employees are randomly formed . Therefore we end up with 10 different samples of two employees. For each sample we compute the mean of the hours per week Samples Mean of hours of work per week {Dunn, Hardy} 48/2 = 24 {Dunn, Kiers} 52/2 = 26 {Dunn, Malinowski} 48/2 = 24 {Dunn, Tillman} 44/2 = 22 {Hardy, Kiers} 56/2 = 28 {Hardy, Malinowski} 52/2 = 26 {Hardy, Tillman} 48/2 = 24 {Kiers, Malinowski} 56/2 = 28 {Kiers, Tillman} 52/2 = 26 {Malinowski, Tillman} 48/2 = 24 Sampling distribution of the mean We construct a relative frequency distribution table of all the sample means Sample means Frequencies Relative frequencies - probabilities 22 1 1/10 24 4 4/10 26 3 3/10 28 2 2/10 Graph of the sampling distribution of the mean of working hours per week Relation between the sampling distribution of the mean and the population distribution The mean of the sampling distribution of the mean equals to the mean of the population from which the scores were sampled. mean of the sampling distribution of the mean: 22 *1 24 * 4 26 * 3 28 * 2 X 25.2 10 Population mean: 22 26 30 26 22 25.2 5 The variance of the sampling distribution of the mean equals to the population variance divided by n (the sample size) 2 X2 n Central Limit Theorem Given a population with mean μ and variance 2, the sampling distribution of the mean approaches a normal distribution 2 with a mean of μ and a variance of / n as n, the sample size, increases. How large must n be? Usually n ≥ 30 Regardless of the shape of the population distribution, the sampling distribution of the mean approaches a normal distribution as n increases X ~ N ( , 2 n ) Estimation Suppose we have an unknown population parameter which we'd like to estimate. For instance, we are interested in estimating a population mean μ or a population proportion p. We can't possibly gather data for the entire population So we take a random sample from the population, and use the resulting data to estimate the value of the population parameter. Point Estimation: we compute a single value from the sample data to estimate a population parameter. For example, the sample mean is a point estimate of the population mean μ. 1 n x xi n i 1 Interval Estimates After we make a point estimate , we are going to draw a target (an interval) around the point and state the probability that the real objective is in the target area. Interval estimates are often desirable because the point estimates vary from sample to sample. The wider the interval, the greater the probability. Also, the more accurate the point estimate, the greater the probability. A confidence interval provides a range of values which is likely to contain the population parameter of interest, usually either 95% or 99% of the time. These intervals are referred to as 95% and 99% confidence intervals respectively. PL1 L2 0.95 where μ denotes the population mean, while L1 and L2 represent the lower and upper bounds of the interval Confidence Intervals Confidence intervals are computed at a confidence level, such as 95 %, selected by the user. A confidence level refers to the percentage of all possible samples that can be expected to include the true population parameter. (1- α)% denotes the confidence coefficient example: (1- 0.05)= 0.95 or 95% confidence interval is defined as: 70.23 < μ < 100 a 95% confidence interval is an interval where there is a 0.95 probability of containing the population mean the population mean lies between 70.23 and 100 Confidence Intervals The sample mean is used as a point estimate of the population mean; we also use it to construct an interval estimate for the population mean μ. If the population distribution is normal, then the point estimate x will be approximately normally distributed, with a mean μ and a standard error n Central Limit Theorem: If the population distribution is not normal, when sample size n is large, the point estimate x will be approximately normally distributed, with a mean μ and a standard error n Confidence Intervals for the mean Before we take a random sample from the population, it is likely (0.95) to find the sample mean in the interval 1.96 n After we take a random sample from the population, approximately 95% of the intervals x 1.96 n will include the population mean μ. Therefore, x 1.96 is the 95% confidence interval for μ n Confidence Intervals for the mean When σ is known, or when n > 30, then the (1- α)% confidence interval for μ is x za 2 n where α is the desired significance level, zα/2 is a value of z having a tail area of α/2 to its right in the standard normal distribution. Critical values of z and levels of confidence 0.99 0.98 0.95 0.90 0.80 2 0.005 0.010 0.025 0.050 0.100 Stand ard N o rm al Distrib utio n z 0.4 2 2.576 2.326 1.960 1.645 1.282 (1 ) 0.3 f(z) (1 ) 0.2 0.1 2 2 0.0 -5 -4 -3 -2 -1 z 2 0 1 2 Z z 2 3 4 5 How do we find the critical values from the standard normal distribution table For instance assume that α =5% We find the probability (1- α/2) = (1- 0.05/2)= 1- 0.025 = 0.9750 Then check the number of z that corresponds to the specific row and column of the probability Confidence Intervals for the mean Example 1: European Management Association wishes to estimate the average income of the administrators of the European banking sector. The company used a random sample of 256 administrators and found that the mean income is 45420 euro. The standard deviation of the sample is 2.05. The company wants to investigate : What is the population mean income What is the a reasonable range of values for the total population mean income Confidence Intervals for the mean: example We use the sample mean to estimate the population mean income. Therefore, the sample mean 45420 is the point estimate of the unknown population mean parameter. We calculate a 95% confidence interval for the population mean X z 0.05 2 n 45420 1.96 2050 45420 251 [45169,45671] 256 Confidence Intervals for the mean: example Example 2: The president of the MBA department wants to estimate the weekly homework hours of the department’s students. He finds that the average weekly hours are 24 with standard deviation 4, based on a random sample of 49 students. What is the population mean? Compute a 95% confidence level for the population mean Confidence Intervals for the mean: example We use the sample mean to estimate the population mean. Therefore, the sample mean of 24 weekly hours is the point estimate of the unknown population parameter The 95% confidence levels for the population mean are: X z 0.05 2 n 24.00 1.96 4 49 24.00 1.12 Thus, the confidence limits are 22.88 and 25.12 hours Confidence Intervals for the mean When σ is unknown, and n < 30, then the confidence interval for μ is given by s x ta , n 1 n 2 where tα/2,n-1 is the critical value of the t distribution at α/2 with n -1 degrees of freedom, and s is the sample standard deviation defined as 1 n 2 s ( x x ) i n 1 i 1 t distribution The t distribution is a family of symmetric distributions is very similar to the normal distribution when the estimate of variance is based on many degrees of freedom, but has relatively more scores in its tails when there are fewer degrees of freedom. As the degrees of freedom increase, Student's t distribution approaches the normal distribution How to find critical values from a t distribution table df --1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 40 60 120 t0.100 ----3.078 1.886 1.638 1.533 1.476 1.440 1.415 1.397 1.383 1.372 1.363 1.356 1.350 1.345 1.341 1.337 1.333 1.330 1.328 1.325 1.323 1.321 1.319 1.318 1.316 1.315 1.314 1.313 1.311 1.310 1.303 1.296 1.289 1.282 t0.050 ----6.314 2.920 2.353 2.132 2.015 1.943 1.895 1.860 1.833 1.812 1.796 1.782 1.771 1.761 1.753 1.746 1.740 1.734 1.729 1.725 1.721 1.717 1.714 1.711 1.708 1.706 1.703 1.701 1.699 1.697 1.684 1.671 1.658 1.645 t0.025 -----12.706 4.303 3.182 2.776 2.571 2.447 2.365 2.306 2.262 2.228 2.201 2.179 2.160 2.145 2.131 2.120 2.110 2.101 2.093 2.086 2.080 2.074 2.069 2.064 2.060 2.056 2.052 2.048 2.045 2.042 2.021 2.000 1.980 1.960 t0.010 -----31.821 6.965 4.541 3.747 3.365 3.143 2.998 2.896 2.821 2.764 2.718 2.681 2.650 2.624 2.602 2.583 2.567 2.552 2.539 2.528 2.518 2.508 2.500 2.492 2.485 2.479 2.473 2.467 2.462 2.457 2.423 2.390 2.358 2.326 t0.005 -----63.657 9.925 5.841 4.604 4.032 3.707 3.499 3.355 3.250 3.169 3.106 3.055 3.012 2.977 2.947 2.921 2.898 2.878 2.861 2.845 2.831 2.819 2.807 2.797 2.787 2.779 2.771 2.763 2.756 2.750 2.704 2.660 2.617 2.576 If n = 15, and α = 5%, then for degrees of freedom (df) = n – 1 = 15 -1 =14, and α/2 = 0.05/2 = 0.025, the critical value is tα/2, n-1 = 2.145 Confidence Intervals for the mean When σ is unknown, and n > 30, then the confidence interval for μ is x za 2 s n where zα/2 is the critical value at α/2 of the standard normal distribution and s is the sample standard deviation 1 n 2 s ( x x ) i n 1 i 1 Hypothesis Testing Hypothesis testing is a procedure in which a statistical test is used to evaluate whether there is enough evidence in a data sample to infer that a certain condition is true for the entire population. The usual process of hypothesis testing consists of five steps: Formulate the null hypothesis H0 (that the observations are the result of pure chance) and the alternative hypothesis H1 (that the observations show a real effect ). Determine a test statistic (Z) that can be used to assess the validity of the null hypothesis. Choose the level of statistical significance α, which controls the probability of committing Type I error: P(Z C1 ; H 0 is valid ) Set the criteria for a decision. In particular, specify two regions, the acceptance region C0, and the rejection region C1. Make a decision. We accept the H0 when the value of the test statistic lies in the acceptance region C0, while we reject the H0 and accept the H1 when the value of the test statistic lies in the rejection region C1 Hypothesis Testing Step 1: Formulate the null hypothesis The null hypothesis (H0), stated as the null, is a statement about a population parameter, such as the population mean, that is assumed to be true. For example, H0: μ = 0 An alternative hypothesis (H1) is a statement that directly contradicts a null hypothesis by stating that the actual value of a population parameter is less than, greater than, or different from the value stated in the null hypothesis. For example: H1: μ < 0 or H1: μ ≠ 16 Hypothesis Testing Step 2: Determine a test statistic The test statistic is a mathematical formula that allows us to determine the likelihood of obtaining sample outcomes if the null hypothesis were true. The value of the test statistic is used to make a decision regarding the null hypothesis. The test statistic is a random variable because is a function of random variables. For instance, consider hypothesis testing for the population mean: 2 X X ~ N ( , ) Z ~ N (0,1) n / n Hypothesis Testing Step 3: determine the level of significance (α) We decide whether to retain or reject the null hypothesis. Because we are observing a sample and not an entire population, it is possible that a conclusion may be wrong. There are four decision alternatives regarding the truth and falsity of the decision we make about a null hypothesis: Hypothesis Testing Step 3: determine the level of significance (α) Type I error is the probability of rejecting a null hypothesis that is actually true. Researchers directly control for the probability of committing this type of error. Type II error, is the probability of retaining a null hypothesis that is actually false. Since we assume the null hypothesis is true, we control for Type I error by stating a level of significance. The level we set, called the alpha level (symbolized as α), is the largest probability of committing a Type I error that we will allow and still decide to reject the null hypothesis. This criterion is usually set at 0.05 (α = 0.05) Hypothesis Testing Step 4: Set the criteria for a decision We form two regions: the acceptance region C0, and the rejection region C1. The rejection region is the region beyond a critical value in a hypothesis test. When the value of a test statistic is in the rejection region, we decide to reject the null hypothesis; otherwise, we retain the null hypothesis. Critical value is the value that separates the rejection region from the acceptance region Hypothesis Testing The rejection region is defined by the values for which we reject the null hypothesis. These values which are considered to be extreme (very large or very low), so that the probabilities to occur if H0 is valid are minimum Hypothesis Testing Step 5: Make a decision. To make a decision, we compare the obtained value of the test statistic to the critical values. We reject the null hypothesis if the obtained value exceeds a critical value. Hypothesis Testing for the mean: twotailed testing Two tailed testing is when the alternative hypothesis is stated as different than (≠). Step 1: We define null and alternative hypotheses: H0: μ = μ0, Η1: μ ≠ μ0 Step 2: Choosing a test statistic: When the sample size is large (n>30) and the standard deviation of the population is known, we use the Z statistic: Z X 0 ~ N (0,1) / n Hypothesis Testing for the mean: twotailed testing Step 3: Set the criteria for the decision We specify the acceptance region C0, and the rejection region C1. C0 : Z * : Z * c C1 : Z * : Z * c where Z * is the value of the Z test statistic and c denotes the critical value of the standard normal distribution for a specific level of significance (α) Hypothesis Testing for the mean: twotailed testing Step 4: determine the level of significance (α): The level we set, is the largest probability of committing a Type I error P(Z C1 ; H 0 is valid ) P( Z * c; H 0 is valid ) 2 * P( Z * c; H 0 is valid ) or P( Z * c; H 0 is valid ) / 2 c z / 2 Since we result in c = zα/2, we find the value of c from the standard normal distribution table Hypothesis Testing for the mean: twotailed testing Step 5: Make a decision for example, when α = 5% Rejection region Critical value Rejection region Critical value Reject H0 if Z * 1.96 or Z * 1.96 Hypothesis Testing for the mean: σ unknown and large sample size When the sample size is large (n > 30) and the standard deviation of the population is unknown, we use the Z statistic: X 0 Z ~ N (0,1) s/ n where s is the sample standard deviation, calculated as 1 n 2 s ( x x ) i n 1 i 1 The other steps of the hypothesis testing procedure remain the same Hypothesis Testing for the mean: two tailed testing with σ unknown and small sample size Step 1: We define null and alternative hypotheses: H0: μ = μ0, Η1: μ ≠ μ0 Step 2: Choosing a test statistic: When the sample size is small (n < 30) and the standard deviation of the population is unknown, we use the t statistic: t X 0 ~ t (n 1) s/ n where s is the sample standard deviation, and t is t distribution with n – 1 degrees of freedom Hypothesis Testing for the mean: two tailed testing with σ unknown and small sample size Step 3: Set the criteria for the decision We specify the acceptance region C0, and the rejection region C1. C0 : t * : t * c C1 : t * : t * c where t * is the value of the t test statistic and c denotes the critical value of the t distribution for a specific level of significance (α) with n – 1 degrees of freedom Hypothesis Testing for the mean: two tailed testing with σ unknown and small sample size Step 4: determine the level of significance (α): The level we set, is the largest probability of committing a Type I error P(t * C1 ; H 0 is valid ) P( t * c; H 0 is valid ) 2 * P(t * c; H 0 is valid ) or P(t * c; H 0 is valid ) / 2 c t / 2,n 1 Since we result in c = tα/2, n -1, we find the value of c from the t distribution table . For example, when the degrees of freedom are 10, we get: Level of Significance (α) Critical Value tα/2 0.01 3.169 0.05 2.228 0.1 1.812 Hypothesis Testing for the mean: two tailed testing with σ unknown and small sample size Step 5: Make a decision for example, when α = 5% Rejection region Rejection region -2.226 2.226 Critical value Reject H0 if t * 2.228 or t * 2.228 Critical value Hypothesis Testing for the mean: one tailed testing (with σ known) One tailed testing is when the alternative hypothesis is stated as less than (<) or greater than (>). Step 1: We define null and alternative hypotheses: H0: μ = μ0, Η1: μ < μ0 Step 2: Choosing a test statistic: When the sample size is large (n>30) and the standard deviation of the population is known, we use the Z statistic: Z X 0 ~ N (0,1) / n Hypothesis Testing for the mean: one tailed testing (with σ known) Step 3: Set the criteria for the decision We specify the acceptance region C0, and the rejection region C1. C0 : Z * : Z * c C1 : Z * : Z * c where Z * is the value of the Z test statistic and c denotes the critical value of the standard normal distribution for a specific level of significance (α) Hypothesis Testing for the mean: one tailed testing (with σ known) Step 4: determine the level of significance (α): The level we set, is the largest probability of committing a Type I error P(Z * C1 ; H 0 is valid ) or P(Z * c; H 0 is valid ) c za Since we result in c = zα, we find the value of c from the standard normal distribution table Hypothesis Testing for the mean: one tailed testing (with σ known) Step 5: Make a decision for example, when α = 5% Rejection region Critical value Reject H0 if Z * 1.645 Hypothesis Testing for the mean: one tailed testing (with σ unknown, small sample) Step 1: We define null and alternative hypotheses: H0: μ = μ0, Η1: μ < μ0 Step 2: Choosing a test statistic: When the sample size is small (n < 30) and the standard deviation of the population is unknown, we use the t statistic: t X 0 ~ t (n 1) s/ n where s is the sample standard deviation, and t is t distribution with n – 1 degrees of freedom Hypothesis Testing for the mean: one tailed testing (with σ unknown, small sample) Step 3: Set the criteria for the decision We specify the acceptance region C0, and the rejection region C1. C0 : t * : t * c C1 : t * : t * c where t * is the value of the t test statistic and c denotes the critical value of the t distribution for a specific level of significance (α) with n – 1 degrees of freedom Hypothesis Testing for the mean: one tailed testing (with σ unknown, small sample) Step 4: determine the level of significance (α): The level we set, is the largest probability of committing a Type I error P(t * C1 ; H 0 is valid ) or P(t * c; H 0 is valid ) c ta ,n1 Since we result in c = tα, we find the value of c from the t distribution table. For example, when the degrees of freedom are 10, we get: Level of Significance (α) Critical Value tα/2 0.01 -2.764 0.05 -1.812 0.1 -1.372 Hypothesis Testing for the mean: one tailed testing (with σ unknown, small sample) Step 5: Make a decision for example, when α = 5% Rejection region -1.812 Critical value Reject H0 if t * 1.812 Hypothesis Testing for the mean: example 1 Company A sells credit cards. The manager of this company wants to find out whether the average amount of unpaid cards overcomes the 400$. A random check of 172 unpaid cards shows that the sample mean is 407$ while the population standard deviation is 38$. Can we infer that average amount of unpaid cards overcomes the 400$ at level of significance 5%? Hypothesis Testing for the mean: example Step 1: H0: µ = $400, H1: µ > $400 Step 2: the level of significance is equal to 0.05 Step 3: since the sample size is large, and the population standard deviation is known, we use the Z test statistic Step 4: the null hypothesis H0 is rejected when Ζ >1.65 Z X 0 $407 $400 2.42 n $38 172 Step 5: Since 2.42 > 1.65, we reject the null hypothesis. Therefore, we conclude that the average amount of unpaid cards overcomes the 400$ at level of significance 5% Hypothesis Testing for the mean: example 2 Canon, Inc., launches a new machine that makes paper copies faster than the previous copy machines. The company selected randomly 24 new machines and estimated that the average speed of the new machine is 24.7 paper copies per second with standard deviation 7.4 seconds/copy. The older models produced 27 papers per second. The firm wants to check whether the new machine has the same average paper copying speed with the previous models at level of significance 5%. Hypothesis Testing for the mean: example 2 Step 1: H0: µ = 27, H1: µ ≠ 27 Step 2: the level of significance is equal to 0.05 Step 3: since the sample size is small, and the population standard deviation is unknown, we use the t test statistic Step 4: the null hypothesis H0 is rejected when [t < -2.069] or t 2.069] (for α/2 = 0.05/2 = 0.025 and n -1 = 24 -1 =23 degrees of freedom: tα/2 = 2.069) t x 0 24.6 - 27 1.59 s 7.4/ 24 n Step 5: Since -1.59 > -2.069 , we accept the null hypothesis. Therefore, we conclude that the new machine has the same average speed of paper copying with the older models The notion of the p-value The p-value represents the probability of the occurrence of a specific value of the test statistic The p-value is used as an alternative to rejection points to provide the smallest level of significance at which the null hypothesis would be rejected. The smaller the p-value, the stronger the evidence is in favor of the alternative hypothesis. Calculation of the p-value: one-sided testing: Two-sided testing: p value P Z Z * p value 2 P Z Z * If p-value ≥ 0.05 , we have strong support of the null hypothesis (accept H0) ; otherwise we reject the null hypothesis The notion of the p-value previous example: We found that the value of the test statistic is Z = 1.35. In this case we have two-sided testing, so p value 2 P Z Z * 2 PZ 1.35 2 PZ 1.35 2(1 PZ 1.35) 2(1 0.911492) 0.177016 Since the p-value > 0.05, we find strong evidence in support of the null hypothesis. Therefore, we accept H0