Introduction to Statistics - Part 2

3,874 views

Published on

Published in: Education, Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,874
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
56
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Introduction to Statistics - Part 2

  1. 1. Quantitative Data Analysis: Statistics – Part 2
  2. 2. Abraham de Moivre <ul><li>Born 26 May 1667 </li></ul><ul><li>Died 27 November 1754 </li></ul><ul><li>Born in Champagne, France </li></ul><ul><li>wrote a textbook on probability theory, &quot; The Doctrine of Chances: a method of calculating the probabilities of events in play &quot;. This book came out in four editions, 1711 in Latin, and 1718, 1738 and 1756 in English. </li></ul><ul><li>In the later editions of his book, de Moivre gives the first statement of the formula for the normal distribution curve. </li></ul>
  3. 3. Carl Friedrich Gauss <ul><li>Born 30 April 1777 </li></ul><ul><li>Died 23 February 1855 </li></ul><ul><li>Born in Lower Saxony, Germany </li></ul><ul><li>In 1809 Gauss published the monograph “ Theoria motus corporum coelestium in sectionibus conicis solem ambientium ” where among other things he introduces and describes several important statistical concepts, such as the method of least squares, the method of maximum likelihood, and the normal distribution. </li></ul>
  4. 5. The Normal Distribution
  5. 6. The Normal Distribution <ul><li>Age of students in a class </li></ul><ul><li>Body temperature </li></ul><ul><li>Pulse rate </li></ul><ul><li>Shoe size </li></ul><ul><li>IQ score </li></ul><ul><li>Diameter of trees </li></ul><ul><li>Height? </li></ul>
  6. 7. The Normal Distribution
  7. 8. The Normal Distribution
  8. 10. Density Curves: Properties
  9. 11. The Normal Distribution <ul><li>The graph has a single peak at the center, this peak occurs at the mean </li></ul><ul><li>The graph is symmetrical about the mean </li></ul><ul><li>The graph never touches the horizontal axis </li></ul><ul><li>The area under the graph is equal to 1 </li></ul>
  10. 12. Characterization <ul><li>A normal distribution is bell-shaped and symmetric. </li></ul><ul><li>The distribution is determined by the mean mu,  and the standard deviation sigma,  . </li></ul><ul><li>The mean mu controls the center and sigma controls the spread. </li></ul>
  11. 22. The Normal Distribution <ul><li>If a variable is normally distributed, then: </li></ul><ul><ul><li>within one standard deviation of the mean there will be approximately 68% of the data </li></ul></ul><ul><ul><li>within two standard deviations of the mean there will be approximately 95% of the data </li></ul></ul><ul><ul><li>within three standard deviations of the mean there will be approximately 99.7% of the data </li></ul></ul>
  12. 23. The Normal Distribution
  13. 24. Why? <ul><li>One reason the normal distribution is important is that many psychological and organsational variables are distributed approximately normally. Measures of reading ability, introversion, job satisfaction, and memory are among the many psychological variables approximately normally distributed. Although the distributions are only approximately normal, they are usually quite close. </li></ul>
  14. 25. Why? <ul><li>A second reason the normal distribution is so important is that it is easy for mathematical statisticians to work with. This means that many kinds of statistical tests can be derived for normal distributions. Almost all statistical tests discussed in this text assume normal distributions. Fortunately, these tests work very well even if the distribution is only approximately normally distributed. Some tests work well even with very wide deviations from normality. </li></ul>
  15. 26. So what? <ul><li>Imagine we undertook an experiment where we measured staff productivity before and after we introduced a computer system to help record solutions to common issues of work </li></ul><ul><ul><li>Average productivity before = 6.4 </li></ul></ul><ul><ul><li>Average productivity after = 9.2 </li></ul></ul>
  16. 27. So what? Before = 6.4 After = 9.2 0 10
  17. 28. So what? Is this a significant difference? Before = 6.4 After = 9.2 10 0
  18. 29. So what? or is it more likely a sampling variation? Before = 6.4 After = 9.2 10 0
  19. 30. So what? Before = 6.4 After = 9.2 10 0
  20. 31. So what? Before = 6.4 After = 9.2 10 0
  21. 32. So what? Before = 6.4 After = 9.2 How many standard devaitions from the mean is this? 10 0
  22. 33. So what? Before = 6.4 After = 9.2 How many standard devaitions from the mean is this? 10 0 and is it statistically significant?
  23. 34. So what? Before = 6.4 After = 9.2 10 0 σ σ σ
  24. 35. One Tail / Two Tail <ul><li>One-Tailed </li></ul><ul><ul><li>H0 : m1 >= m2 </li></ul></ul><ul><ul><li>HA : m1 < m2 </li></ul></ul><ul><li>Two-Tailed </li></ul><ul><ul><li>H0 : m1 = m2 </li></ul></ul><ul><ul><li>HA : m1 <>m2 </li></ul></ul>
  25. 36. STANDARD NORMAL DISTRIBUTION <ul><li>Normal Distribution is defined as </li></ul><ul><li>N(mean, (Std dev)^2) </li></ul><ul><li>Standard Normal Distribution is defined as </li></ul><ul><li>N(0, (1)^2) </li></ul>
  26. 37. STANDARD NORMAL DISTRIBUTION <ul><li>Using the following formula : </li></ul><ul><li>will convert a normal table into a standard normal table. </li></ul>
  27. 38. Exercise <ul><li>If the average IQ in a given population is 100, and the standard deviation is 15, what percentage of the population has an IQ of 145 or higher ? </li></ul>
  28. 39. Answer <ul><li>P(X >= 145) </li></ul><ul><li>P(Z >= ((145 - 100)/15)) </li></ul><ul><li>P(Z >= 3) </li></ul><ul><li>From tables: 99.87% are less than 3 </li></ul><ul><li>=> 0.13% of population </li></ul>
  29. 40. Trends in Statistical Tests used in Research Papers Historically Currently Testing Estimation Hypothesis Tests Quoting P-Values Confidence Intervals Results in: Accept/Reject Results in: p-Value Results in: Approx. Mean
  30. 41. Confidence Intervals   <ul><li>A confidence interval is used to express the uncertainty in a quantity being estimated. There is uncertainty because inferences are based on a random sample of finite size from a population or process of interest. To judge the statistical procedure we can ask what would happen if we were to repeat the same study, over and over, getting different data (and thus different confidence intervals) each time. </li></ul>
  31. 42. Confidence Intervals  
  32. 43. <ul><li>Born April 16, 1894 </li></ul><ul><li>Died August 5, 1981 </li></ul><ul><li>Born in Bessarabia, Imperial Russia </li></ul><ul><li>statistician who spent most of his professional career at the University of California, Berkeley. </li></ul><ul><li>Developed modern scientific sampling (random samples) in 1934, the confidence interval in 1937 and the Neyman-Pearson lemma in 1933. </li></ul>Jerzy Neyman
  33. 44. <ul><li>Born 11 August 1895 </li></ul><ul><li>Died 12 June 1980 </li></ul><ul><li>Born in Hampstead, London </li></ul><ul><li>Son of Karl Pearson </li></ul><ul><li>Leading British statistician </li></ul><ul><li>Developed the Neyman-Pearson lemma in 1933. </li></ul>Egon Pearson
  34. 45. <ul><li>Neyman and Pearson's joint work formally started in the spring of 1927. </li></ul><ul><li>From 1928 to 1934, they published several important papers on the theory of testing statistical hypotheses. </li></ul><ul><li>In developing their theory, Neyman and Pearson recognized the need to include alternative hypotheses and they perceived the errors in testing hypotheses concerning unknown population values based on sample observations that are subject to variation. </li></ul><ul><li>They called the error of rejecting a true hypothesis the first kind of error and the error of accepting a false hypothesis the second kind of error. </li></ul><ul><li>They called a hypothesis that completely specifies a probability distribution a simple hypothesis. A hypothesis that is not a simple hypothesis is a composite hypothesis. </li></ul><ul><li>Their joint work lead to Neyman developing the idea of confidence interval estimation, published in 1937. </li></ul>
  35. 46. Confidence Intervals   <ul><li>Neyman, J. (1937) &quot; Outline of a theory of statistical estimation based on the classical theory of probability &quot; Philos. Trans. Roy. Soc. London. Ser. A. , Vol. 236 pp. 333–380. </li></ul>
  36. 47. Confidence Intervals   <ul><li>If we know the true population mean and sample n individuals, we know that if the data is normally distributed, Average mean of these n samples has a 95% chance of falling into the interval. </li></ul>
  37. 48. Confidence Intervals   <ul><li>where the standard error for a 95% CI may be calculated as follows; </li></ul>
  38. 49. Example 1
  39. 50. Example 1 <ul><li>Does FF-PD-G have more of the popular vote than FG-L ? </li></ul><ul><ul><li>In a random sample of 721 respondents : </li></ul></ul><ul><ul><ul><li>382 FF-PD-G </li></ul></ul></ul><ul><ul><ul><li>339 FG-L </li></ul></ul></ul><ul><li>Can we conclude that FF-PD-G has more than 50% of the popular vote ? </li></ul>
  40. 51. Example 1 - Solution <ul><ul><li>Sample proportion = p = 382/721 = 0.53 </li></ul></ul><ul><ul><li>Sample size = n = 721 </li></ul></ul><ul><ul><li>Standard Error = (SqRt((p(1-p)/n))) = 0.02 </li></ul></ul><ul><ul><li>95% Confidence Interval </li></ul></ul><ul><ul><ul><li>0.53 +/- 1.96 (0.02) </li></ul></ul></ul><ul><ul><ul><li>0.53 +/- 0.04 </li></ul></ul></ul><ul><ul><ul><li>[0.49, 0.57] </li></ul></ul></ul><ul><ul><ul><li>Thus, we cannot conclude that FF-PD-G had more of the popular vote, since this interval spans 50%. So, we say: &quot;the data are consistent with the hypothesis that there is no difference&quot;  </li></ul></ul></ul>
  41. 52. Example 2
  42. 53. Example 2 <ul><li>Did Obama have more of the popular vote than McCain ? </li></ul><ul><ul><li>In a random sample of 1000 respondents </li></ul></ul><ul><ul><ul><li>532 Obama </li></ul></ul></ul><ul><ul><ul><li>468 McCain </li></ul></ul></ul><ul><li>Can we conclude that Obama had more than 50% of the popular vote ? </li></ul>
  43. 54. Example 2 – 95% CI <ul><ul><li>Sample proportion = p = 532/1000 = 0.532 </li></ul></ul><ul><ul><li>Sample size = n = 1000 </li></ul></ul><ul><ul><li>Standard Error = (SqRt((p(1-p)/n))) = 0.016 </li></ul></ul><ul><ul><li>95% Confidence Interval </li></ul></ul><ul><ul><ul><li>0.532 +/- 1.96 (0.016) </li></ul></ul></ul><ul><ul><ul><li>0.532 +/- 0.03136 </li></ul></ul></ul><ul><ul><ul><li>[0.5006, 0.56336] </li></ul></ul></ul><ul><ul><ul><li>Thus, we can conclude that Obama had more of the popular vote, since this interval does not span 50%. So, we say : &quot;the data are consistent with the hypothesis that there is a difference in a 95% CI&quot;  </li></ul></ul></ul>
  44. 55. Example 2 – 99% CI <ul><ul><li>Sample proportion = p = 532/1000 = 0.532 </li></ul></ul><ul><ul><li>Sample size = n = 1000 </li></ul></ul><ul><ul><li>Standard Error = (SqRt((p(1-p)/n))) = 0.016 </li></ul></ul><ul><ul><li>99% Confidence Interval </li></ul></ul><ul><ul><ul><li>0.532 +/- 2.58 (0.016) </li></ul></ul></ul><ul><ul><ul><li>0.532 +/- 0.041 </li></ul></ul></ul><ul><ul><ul><li>[0.491, 0.573] </li></ul></ul></ul><ul><ul><ul><li>Thus, we cannot conclude that Obama had more of the popular vote, since this interval does span 50%. So, we say : &quot;the data are consistent with the hypothesis that there is no difference in a 99% CI&quot;  </li></ul></ul></ul>
  45. 56. Example 2 – 99.99% CI <ul><ul><li>Sample proportion = p = 532/1000 = 0.532 </li></ul></ul><ul><ul><li>Sample size = n = 1000 </li></ul></ul><ul><ul><li>Standard Error = (SqRt((p(1-p)/n))) = 0.016 </li></ul></ul><ul><ul><li>99.99% Confidence Interval </li></ul></ul><ul><ul><ul><li>0.532 +/- 3.87 (0.016) </li></ul></ul></ul><ul><ul><ul><li>0.532 +/- 0.06 </li></ul></ul></ul><ul><ul><ul><li>[0.472, 0.592] </li></ul></ul></ul><ul><ul><ul><li>Thus, we cannot conclude that Obama had more of the popular vote, since this interval does span 50%. So, we say : &quot;the data are consistent with the hypothesis that there is no difference in a 99.99% CI&quot;  </li></ul></ul></ul>
  46. 57. T-Tests
  47. 58. William Sealy Gosset <ul><li>Born June 13, 1876 </li></ul><ul><li>Died October 16, 1937 </li></ul><ul><li>Born in Canterbury, England </li></ul><ul><li>On graduating from Oxford in 1899, he joined the Dublin brewery of Arthur Guinness & Son. </li></ul><ul><li>Published significant paper in 1908 concerning the t-distribution </li></ul>
  48. 59. <ul><li>Gosset acquired his statistical knowledge by study, and he also spend two terms in 1906–1907 in the biometric laboratory of Karl Pearson. </li></ul><ul><li>Gosset applied his knowledge for Guinness both in the brewery and on the farm - to the selection of the best yielding varieties of barley, and to compare the different brewing processes for changing raw materials into beer. </li></ul><ul><li>Gosset and Pearson had a good relationship and Pearson helped Gosset with the mathematics of his papers. </li></ul><ul><li>Pearson helped with the 1908 paper but he had little appreciation of their importance. </li></ul><ul><li>The papers addressed the brewer's concern with small samples, while the biometrician typically had hundreds of observations and saw no urgency in developing small-sample methods. </li></ul>
  49. 60. T-Tests <ul><li>Student (1908), “ The Probable Error of a Mean ” Biometrika, Vol. 6, No. 1, pp.1-25. </li></ul>
  50. 61. T-Tests <ul><li>Guinness did not allow its employees to publish results but the management decided to allow Gossett to publish it under a pseudonym - Student. Hence we have the Student's t-test . </li></ul>
  51. 62. T-Tests <ul><li>powerful parametric test for calculating the significance of a small sample mean </li></ul><ul><li>necessary for small samples because their distributions are not normal </li></ul><ul><li>one first has to calculate the &quot;degrees of freedom&quot; </li></ul>
  52. 64. <ul><li>  </li></ul><ul><li>~ THE GOLDEN RULE ~ </li></ul><ul><li>Use the t-Test when your </li></ul><ul><li>sample size is less than 30 </li></ul>
  53. 65. T-Tests <ul><li>If the underlying population is normal </li></ul><ul><li>If the underlying population is not skewed and reasonable to normal </li></ul><ul><li>(n < 15) </li></ul><ul><li>If the underlying population is skewed and there are no major outliers </li></ul><ul><li>(n > 15) </li></ul><ul><li>If the underlying population is skewed and some outliers </li></ul><ul><li>(n > 24) </li></ul>
  54. 66. T-Tests <ul><li>Form of Confidence Interval with t-Value </li></ul><ul><li>Mean +/- tValue * SE </li></ul><ul><li>-------- ------- </li></ul><ul><li>as before as before </li></ul>
  55. 67. Two Sample T-Test: Unpaired Sample <ul><li>Consider a questionnaire on computer use to final year undergraduates in year 2007 and the same questionnaire give to undergraduates in 2008. As there is no direct one-to-one correspondence between individual students (in fact, there may be different number of students in different classes), you have to sum up all the responses of a given year, obtain an average from that, down the same for the following year, and compare averages. </li></ul>
  56. 68. Two Sample T-Test: Paired Sample <ul><li>If you are doing a questionnaire that is testing the BEFORE/AFTER effect of parameter on the same population, then we can individually calculate differences between each sample and then average the differences. The paired test is a much strong (more powerful) statistical test. </li></ul>
  57. 69. Choosing the right test
  58. 70. Choosing a statistical test http://www.graphpad.com/www/Book/Choose.htm
  59. 71. Choosing a statistical test http://www.graphpad.com/www/Book/Choose.htm

×