Presentation on theme: "Quantitative Methods Lecture 3"— Presentation transcript:
1Quantitative Methods Lecture 3 Populations and SamplesStatistics books often assume we already know the true mean or the true variance of the whole population being studiedIn the real world, we hardly ever know the true values for the whole population(If we did, there would be no need to carry out a statistical survey…)We usually have to estimate the characteristics of the population from sample surveys
2Estimating the Population Mean Each time we take a sample and calculate the mean, we are only obtaining information about PART of the TOTAL POPULATION.We have to use the sample mean (‘x-bar’) as an ESTIMATE of the population mean (‘mu’) which is usually unknownAs an estimate, x-bar is subject to a margin of error
3Two more statisticsThe Standard Error and the Confidence Interval measure the margins of error on our estimate of the true population mean.The usual Confidence Interval is x-bar plus or minus approximately two standard errors(1.96 standard errors to be precise)In other words, we reckon that our estimated mean is probably within about ± 2 Standard Errors of the true meanBut there are complications…
4Sampling Distributions enable us to make these estimates Let’s draw a number of different samples from a normally distributed populationWe can calculate the mean of each sampleThese sample means give us several different estimates of the true population meanWhen plotted, the sample means group fairly tightly round the population mean in a bell-shape which is much narrower than the normal distributionThe larger the samples from which the means are drawn, the tighter this bell-shape will be
5More on Sampling Distributions The black curve is a Normal DistributionThe blue curve is a Sampling Distribution of various sample meansIf we used larger samples, the means would group more tightlyIf we used smaller samples, less tightly
6The Standard Error of the Mean It has been found that the Standard Error varies in accuracy with the square root of the number in the sampleSo the Standard Error = the Standard Deviation divided by N (“the square root of N”)Thus for any given Standard Deviation, the larger the N (the number in the sample), the smaller the Standard Error will be.We use the standard error to estimate the population mean from the sample mean - subject to a margin of error.
7The 95% Confidence Interval 95% of the Normal Distribution is within ± (plus or minus) 1.96 Standard Deviations of the Mean.In the same way, probability theory shows that, 95% of the time, the true population mean will lie within ±1.96 Standard Errors of any mean calculated from a large sample.(Small samples are more complicated!)
895% probability is not certainty Because we are estimating, we cannot be 100% certainIf something is 95% probable, it is only correct 19 times out of 20So Confidence Intervals are not infallible, unlike Standard Deviations and VariancesBut as long as our samples are large (more than 60) margins of error are fairly small
9Example A sample of 100 ball-bearings are weighed. They have a mean weight of 150 grams with a standard deviation of 8 grams.Find the mean weight of the population as a whole, within the 95% Confidence Interval.Calculate the Standard Error = Std Deviation / ÖN= 8 / Ö100 = 8/10 = 0.8We are 95% certain that the population mean will be within ±1.96*0.8 of the sample mean.So the population mean will lie between *0.8 and *0.8i.e. between and
10Meaning of the Confidence Interval We call it the 95% Confidence Interval because we are fairly (95%) sure the true mean lies between andWe can choose other Confidence IntervalsIf we want to be 99% sure of the true mean, we use a WIDER Confidence Interval of ±2.57 Standard ErrorsThen we say we are 99% sure that the true mean lies between 150 ± 2.056
11Small Samples - A Complication The smaller the sample, the less accurate the estimateInstead of using 1.96 times the Standard Error, we have to widen the margin‘T-tables’ show how much we should widen itIn our example today, N-1 gives the appropriate ‘degrees of freedom’ to be used.So, if we have a sample of 16 cases, the degrees of freedom = 16-1 = 15This gives us the row of the table to use
12See how T-distributions ‘flatten out’ T-distributions change shape by sample size.The normal distribution is shaped like a bellThe T-distributions are shaped more like a cymbal.The larger the sample, the more bell-like the T-distribution becomes.
13T-tables show that for N=16, there are N-1=15 degrees of freedom; so we use 2.13 Standard Errors instead of 1.96 Standard Errors for the 95% CIT-DISTRIBUTION CRITICAL VALUESDegrees of P= P=0.01freedom (for use with (for use with95% C.I.) 99% C.I.)
14Large samples reduce margins of error The smaller the sample, the wider the Confidence Interval becomes in terms of Standard Errors.But if N is large (at least 60 and preferably more than 120), Standard Errors are reduced (because we divide by a sizeableN)In addition, we do not have to increase the number of Standard Errors in the Confidence Interval from the basic ±1.96Taken together, these factors push statisticians towards seeking large samples wherever possible, in order to reduce the margins of error.
15Inferential Statistics Putting our Descriptive Statistics to Work
16Why Inferential Statistics differ from Descriptive Statistics Means, variances, standard deviations and standard errors are Descriptive StatisticsGive anyone a set of figures and the formula and they should come up with the same answersInferential statistics can never tell you if something is true or notThey give you the balance of probabilities about whether something is true.
17How we make inferencesProvided that the sets of data we are examining are distributed normally (more or less), we can make a number of inferences about how likely (or unlikely) specific events will beConfidence Intervals are a part of Inferential Statistics - they do not tell us what the population mean IS, only that the population mean is likely to fall between certain limits
18Inferential Statistics help us to distinguish likely events from unlikely events Thus it is possible to run statistical tests on measurable samples of dataWe select a probability ‘cut-off’ value (e.g. 95% probable versus 5% probable) and make judgements how likely our outcome isThe ‘test statistic’ that we compute tells us whether we have observed a likely event (one that happens 95% of the time) or an unlikely one (one that only happens less than 5% of the time)
19Null Hypothesis And Alternative Hypothesis We start with the assumption that nothing is proved - that there is no connection between sets of data, and everything has occurred by chance. This is called the NULL HYPOTHESISThe ALTERNATIVE HYPOTHESIS is that something unlikely or “significant” links the dataIf our test statistic tells us that we have observed an unlikely event, we REJECT the Null Hypothesis and ACCEPT the Alternative Hypothesis
20Example: the ‘Paired’ T-test Suppose that we give people a ‘treatment’ (training, or medication, or lessons)We want to measure whether the ‘treatment’ has improved their resultsProvided we can measure the outcome, we can test the same sample of people Before and After Treatment and we use the ‘Paired’ T-test
21There are many other tests The paired T-test is a simple test to explainOthers tests we will consider include tests for whether different samples have achieved different mean scoresAnd tests for whether a score on Variable 1 is linked (‘correlated’) to a score on Variable 2
22Example: We give people some training and measure how scores differ after it SCORE BEFORE TRAINING98611131610SCORE AFTER TRAINING1214151013119AFTER minus BEFORE36742-2-1PERSONABCDEFGHIJ
23To calculate our ‘Paired’ T-test Set up the Null Hypothesis:Any difference in scores after training has occurred by chanceSet up the Alternative HypothesisThe difference in mean scores is statistically significantChoose a decision level (‘alpha’)Normally 95% vs 5% (or 0.95 vs 0.05)
24When to reject the Null Hypothesis If we can show that the probability that the Null Hypothesis is true has dropped BELOW 5%, we can reject the Null HypothesisIn which case, we accept the Alternative Hypothesis that the training has made a ‘significant’ differenceOtherwise, we accept the Null Hypothesis that the training did not change the mean score
25Calculating the ‘test statistic’ For each test, we calculate a ‘test statistic’Then we look in our tables to find out whether that number indicates a likely or an unlikely eventIn the case of the Paired T-test, the formula for the test statistic is(X-m) Standard Error
26The T-statistic (or ‘T-ratio’) In (X-m) Standard ErrorX is the mean difference between before and after scoresm is the expected mean difference between before and after scores assuming the Null Hypothesis is trueStandard Error is the Standard Deviation ÖNWhat will m be?
27Calculations for our example SAMPLE MEAN of ‘AFTER minus BEFORE’ column = 23/10 =STANDARD DEVIATION (calculated in the same manner as last week) =STANDARD ERROR = STDEV/SQRT(N) = 2.87/(SQRT(10))T-statistic = (SAMPLE MEAN (2.30) - EXPECTED MEAN (0)) divided by the STD ERROR (0.91)(2.30-0)/ = T =Again, why is m 0?
28What does all this mean?Now that we have calculated that the T-statistic = 2.53, what happens?We check this number against the appropriate row of the T-tablesThe appropriate row will be N-1, or 9 degrees of freedom(because N=10)If our T-statistic is less than the ‘critical value’ in the table, the Null Hypothesis standsIf our T-statistic is greater than the ‘critical value’ in the T-table, the Null Hypothesis falls
29Bother, there are two columns in the T-tables … T-DISTRIBUTION CRITICAL VALUESDegrees of P= P=0.01freedom (for use with (for use with95% C.I.) 99% C.I.)Remember we chose the .95 / .05 cut-off level in advance?This means we use the left columnOur 2.53 ‘beats’ the Critical Value of 2.26 for 9 degrees of freedom
30Concluding the testAt our selected probability level, the T-statistic we have calculated is greater than the number in the tableRemind me what this means …It means that we REJECT the Null HypothesisOur result is UNLIKELY to have occurred by chanceWe conclude that the training HAS significantly changed the mean score
31How much have we achieved? Using probability theory and our test statistic, we have made an assessment of the effectiveness of our trainingBut note again that 95% significance is not certaintyWe are going to be wrong 1 time in 20In ‘life or death’ situations we may want to be 99% or even 99.9% sureTo be 99% sure, we use the right-hand column in the T-table for our ‘critical value’
32Plenty to think about … We have covered a lot of ground this week The Null Hypothesis / Alternative Hypothesis approach is the same for all statistical testsSo is the idea of selecting the acceptable decision level (or ‘alpha’) in advanceBut in other tests, we use different statistical calculations and different degrees of freedom to obtain our test statistic
33And finally:Suppose we had chosen the 99% / 1% cut-off level for our example, what would the result have been?(pause for thought)…