Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
STAT 324 Introduction to Statistics for Engineers Summer 2016 Ismor Fischer UW Dept of Statistics 1227 Medical Science Center [email protected] 1 - Introduction 2 - Exploratory Data Analysis 3 - Probability Theory 4 - Classical Probability Distributions 5 - Sampling Distribs / Central Limit Theorem 6 - Statistical Inference 7 - Correlation and Regression (8 - Survival Analysis) 3 What is “random variation” in the distribution of a population? Examples: Toasting time, Temperature settings, etc. of a population of toasters… POPULATION 1: Little to no variation (e.g., product manufacturing) In engineering situations such as this, we try to maintain “quality control”… i.e., “tight tolerance levels,” high precision, low variability. But what about a population of, say, people? 4 What is “random variation” in the distribution of a population? Example: Body Temperature (F) POPULATION 1: Little to no variation (e.g., clones) Most individual values ≈ population mean value Density Very little variation about the mean! 98.6 F 5 What is “random variation” in the distribution of a population? Example: Examples:Body Gender, Temperature Race, Age, (F) Height, Annual Income,… POPULATION 2: Much variation (more common) Density Much more variation about the mean! 6 What are “statistics,” and how can they be applied to real issues? • Example: Suppose a certain company insists that it complies with “gender equality” regulations among its employee population, i.e., approx. 50% male and 50% female. To test this claim, let us select a random sample of n = 100 employees, and count X = the number of males. (If the claim is true, then we expect X 50.) etc. X = 64 males (+ 36 females) Questions: If the claim is true, how likely is this experimental result? (“p-value”) Could the difference (14 males) be due to random chance variation, or is it statistically significant? GLOBAL OPERATION DYNAMICS, INC. 7 The experiment in this problem can be modeled by a random sequence of n = 100 ...... independent coin tosses (Heads = Male, Tails = Female). It can be mathematically proved that, if the coin is “fair” (“unbiased”), then in 100 tosses: • • • • • • • • • • • • • • • probability of obtaining at…..from least 0 Heads away from 50 is = 1.0000 “certainty” 0 to 100 Heads….. probability of obtaining at least 1 Head away from 50 is = 0.9204 probability of obtaining at least 2 Heads away from 50 is = 0.7644 probability of obtaining at least 3 Heads away from 50 is = 0.6173 probability of obtaining at least 4 Heads away from 50 is = 0.4841 The = .05 probability of obtaining at least 5 Heads away from 50 is = 0.3682 cutoff is probability of obtaining at least 6 Heads away from 50 is = 0.2713 called the probability of obtaining at least 7 Heads away from 50 is = 0.1933 significance probability of obtaining at least 8 Heads away from 50 is = 0.1332 level. probability of obtaining at least 9 Heads away from 50 is = 0.0886 probability of obtaining at least 10 Heads away from 50 is = 0.0569 probability of obtaining at least 11 Heads away from 50 is = 0.0352 probability of obtaining at least 12 Heads away from 50 is = 0.0210 probability of obtaining at least 13 Heads away from 50 is = 0.0120 0.0066 is called probability of obtaining at least 14 Heads away from 50 is = 0.0066 the p-value of etc. 0 the sample. Because our p-value (.0066) is less than the significance level (.05), our data suggest that the coin is indeed biased, in favor of Heads. Likewise, our evidence suggests that employee gender in this company is biased, in favor of Males. 8 What are “statistics,” and how can they be applied to real issues? • Example: Suppose a certain company insists that it complies with “gender equality” regulations among its employee population, i.e., approx. 50% male and 50% female. HYPOTHESIS EXPERIMENT To test this claim, let us select a random sample of n = 100 employees, and count X = the number of males. (If the claim is true, then we expect X 50.) etc. OBSERVATIONS X = 64 males (+ 36 females) Questions: If the claim is true, how likely is this experimental result? (“p-value”) Could the difference (14 males) be due to random chance variation, or is it statistically significant? GLOBAL OPERATION DYNAMICS, INC. 9 The experiment in this problem can be modeled by a random sequence of n = 100 ...... independent coin tosses (Heads = Male, Tails = Female). It can be mathematically proved that, if the coin is “fair” (“unbiased”), then in 100 tosses: • • • • • • • • • • • • • • • probability of obtaining at least 0 Heads away from 50 is = 1.0000 “certainty” probability of obtaining at least 1 Head away from 50 is = 0.9204 probability of obtaining at least 2 Heads away from 50 is = 0.7644 probability of obtaining at least 3 Heads away from 50 is = 0.6173 probability of obtaining at least 4 Heads away from 50 is = 0.4841 The = .05 probability of obtaining at least 5 Heads away from 50 is = 0.3682 cutoff is probability of obtaining at least 6 Heads away from 50 is = 0.2713 called the probability of obtaining at least 7 Heads away from 50 is = 0.1933 significance probability of obtaining at least 8 Heads away from 50 is = 0.1332 level. probability of obtaining at least 9 Heads away from 50 is = 0.0886 probability of obtaining at least 10 Heads away from 50 is = 0.0569 probability of obtaining at least 11 Heads away from 50 is = 0.0352 ANALYSIS probability of obtaining at least 12 Heads away from 50 is = 0.0210 probability of obtaining at least 13 Heads away from 50 is = 0.0120 0.0066 is called probability of obtaining at least 14 Heads away from 50 is = 0.0066 the p-value of etc. 0 the sample. Because our p-value (.0066) is less than the significance level (.05), our data suggest that the coin is indeed biased, in favor of Heads. Likewise, our evidence suggests that employee gender in this company is biased, in favor of Males. CONCLUSION 10 “Classical Scientific Method” Hypothesis – Define the study population... What’s the question? Experiment – Designed to test hypothesis Observations – Collect sample measurements Analysis – Do the data formally tend to support or refute the hypothesis, and with what strength? (Lots of juicy formulas...) Conclusion – Reject or retain hypothesis; is the result statistically significant? Interpretation – Translate findings in context! Statistics is implemented in each step of the classical scientific method! 11 Example • Click on image for full .pdf article • Links in article to access datasets Study Question: How can we estimate “mean age at first birth” of women in the U.S.? POPULATION Women in U.S. who have given birth “Random Variable” X = Age at first birth Suppose we know that X follows a “normal distribution” (a.k.a. “bell curve”) in the population. That is, the Population Distribution of X ~ N(, ). and are “population characteristics” i.e., “parameters” (fixed, unknown) Without knowing every value in the population, it is not possible to determine the exact value of with 100% “certainty.” standard deviation σ mean μ = ??? {x1, x2, x3, x4, … , x400} FORMUL A mean x = 25.6 Study Question: How can we estimate “mean age at first birth” of women in the U.S.? POPULATION Women in U.S. who have given birth “Random Variable” X = Age at first birth x = 25.6 is an example of a “sample characteristic” = “statistic.” (numerical info culled from a sample) Suppose we know that X follows a “normal This is called a “point estimate“ of distribution” (a.k.a. “bell curve”) in the population. from the one sample. That is, the Population Distribution of X ~ N(, ). Can it be improved, and if so, how? • Choose a bigger sample, which standard should reduce “variability.” and are deviation • Average the sample means of “population σ many samples, not just one. characteristics” (introduces “sampling variability”) i.e., “parameters” “Sampling Distribution” ~ ??? (fixed, unknown) mean μ = ??? {x1, x2, x3, x4, … , x400} FORMUL A mean x = 25.6 Study Question: How can we estimate “mean age at first birth” of women in the U.S.? POPULATION Women in U.S. who have given birth Statistical Inference and Hypothesis Testing “Random Variable” X = Age at first birth “Null Hypothesis” Year 2010: Suppose we know that X follows a “normal distribution” (a.k.a. “bell curve”) in the population. That is, X ~ N(25.4, 1.5). • public education, awareness programs • socioeconomic conditions, etc. standard standard deviation deviation σ μ < 25.4 σ = 1.5 Present: Is H0: μ = 25.4 still true? Or, is the “alternative hypothesis” HA: μ ≠ 25.4 true? i.e., either μ < 25.4 or μ > 25.4 ? (2-sided) μ > 25.4 Does the sample statistic x = 25.6 tend to support H0, or refute H0 in favor of HA? 25.4 mean μ = ??? {x1, x2, x3, x4, … , x400} FORMUL A mean x = 25.6 In order to answer this question, we must account for the amount of variability of different x values, from one random sample of n = 400 individuals to another. We will see three things: 95% CONFIDENCE INTERVAL FOR µ = 25.4 25.453 x = 25.6 25.747 BASED ON OUR SAMPLE DATA, the true value of μ today is between 25.453 and 25.747, with 95% “confidence” (…akin to “probability”). 95% ACCEPTANCE REGION FOR H0 25.253 = 25.4 25.547 x = 25.6 IF H0 is true, then we would expect a random sample mean x to lie between 25.253 and 25.547, with 95% probability. IF H0 is true, then we would expect a random sample mean x that is at least 0.2 away from 25.4 (as ours was), to occur with probability .00383 (= 0.383%)… VERY RARELY! ,which is less t “P-VALUE” of our sample 25.4 25.6 In order to answer this question, we must account for the amount of variability of different x values, from one random sample of n = 400 individuals to another. We will see three things: 95% CONFIDENCE INTERVAL FOR µ = 25.4 25.453 x = 25.6 25.747 BASED ON OUR SAMPLE DATA, the true value of μ today is between 25.453 and 25.747, with 95% “confidence” (…akin to “probability”). 95% ACCEPTANCE REGION FOR H0 25.253 = 25.4 25.547 x = 25.6 IF H0 is true, then we would expect a random sample mean x to lie between 25.253 and 25.547, with 95% probability. IF H0 is true, then we would expect a random sample mean x that is at least 0.2 away from 25.4 (as ours was), to occur with probability .00383 (= 0.383%)… VERY RARELY! ,which is less t “P-VALUE” of our sample 25.4 25.6 In order to answer this question, we must account for the amount of variability of different x values, from one random sample of n = 400 individuals to another. We will see three things: 95% CONFIDENCE INTERVAL FOR µ = 25.4 25.453 x = 25.6 25.747 BASED ON OUR SAMPLE DATA, the true value of μ today is between 25.453 and 25.747, with 95% “confidence” (…akin to “probability”). 95% ACCEPTANCE REGION FOR H0 25.253 = 25.4 25.547 x = 25.6 IF H0 is true, then we would expect a random sample mean x to lie between 25.253 and 25.547, with 95% probability. IF H0 is true, then we would expect a random sample mean x that is at least 0.2 away from 25.4 (as ours was), to occur with Less than .05t probability .00383 (= 0.383%)… VERY RARELY! ,which is less “P-VALUE” of our sample < SIGNIFICANCE LEVEL (α) 25.4 25.6 In order to answer this question, we must account for the amount of variability of x values, different from one random sample of n = 400 individuals to another. FORMAL CONCLUSIONS: We will see three things: 95% CONFIDENCE INTERVAL FOR µ The 95% confidence interval corresponding to our sample mean does not contain the “null value” of the population mean, μ = 25.4. = 25.4 25.453 x = 25.6 25.747 The 95% ON acceptance regionDATA, for the contain the BASED OUR SAMPLE thenull truehypothesis value of μ does todaynot is between value25.453 of our sample mean, . x =95% 25.6“confidence” and 25.747, with (…akin to “probability”). The p-value of our sample, .00383, is less than the predetermined α = .05 significance level. 95% ACCEPTANCE REGION FOR H0 Based on our sample data, we may reject the null hypothesis H0: μ = 25.4 in = 25.6 = 25.4 25.547 favor of the two-sided25.253 alternativehypothesis HA: μ ≠ x25.4, at the α = .05 significance IF Hlevel. 0 is true, then we would expect a random sample mean x to lie between 25.253 and 25.547, with 95% probability. INTERPRETATION: According to the results of this study, there exists a statistically difference between the mean ages at first birth in IF Hsignificant 0 is true, then we would expect a random sample mean x 2010 (25.4 old) and today,from at the 5%(as significance Moreover, the thatyears is at least 0.2 away 25.4 ours was),level. to occur with evidenceprobability from the sample suggests that population age Lessmean than .05 .00383data (= 0.383%)… VERYthe RARELY! ,which is less t today is older than in 2010, rather than younger, by about 0.2 years. “P-VALUE” of our sample SIGNIFICANCE LEVEL (α) 25.4 < 25.6 SUMMARY: Why are these methods so important? They help to distinguish whether or not differences between populations are statistically significant, i.e., genuine, beyond the effects of random chance. Computationally intensive techniques that were previously intractable are now easily obtainable with modern PCs, etc. If your particular field of study involves the collection of quantitative data, then eventually you will either: 1 - need to conduct a statistical analysis of your own, or 2 - read another investigator’s methods, results, and conclusions in a book or professional research journal. Moral: You can run, but you can’t hide…. Study Question: How can we estimate “mean age at first birth” of women in the U.S.? • Arithmetic Mean POPULATION Women in U.S. who have given birth “Random Variable” X = Age at first birth “population characteristics” i.e., “parameters” (fixed, unknown) x1 x2 n xn • Geometric Mean xG n x1 x2 xn • Harmonic Mean Suppose we know that X follows a “normal distribution” (a.k.a. “bell curve”) in the population. That is, the Population Distribution of X ~ N(, ). and are xA standard deviation σ xH 1 x1 x12 n Each of these gives an estimate of for a particular sample. Any general sample estimator for is denoted by the symbol ˆ . Likewise for and mean μ = ??? {x1, x2, x3, x4, … , xn} x1n FORMUL A mean x ˆ . Study Question:Other possible parameters: How can we estimate • standard POPULATION deviation “mean age at first birth”• median Women in U.S. who of women in the U.S.? • minimum have given birth • maximum “Random Variable” x = 25.6 is an example of a “sample characteristic” = “statistic.” (numerical info culled from a sample) Suppose we know that X follows a “normal This is called a “point estimate“ of distribution” (a.k.a. “bell curve”) in the population. from the one sample. That is, the Population Distribution of X ~ N(, ). Can it be improved, and if so, how? • Choose a bigger sample, which standard should reduce “variability.” and are ??? deviation • Average the sample means of “population σ many samples, not just one. characteristics” (introduces “sampling variability”) i.e., “parameters” “Sampling Distribution” ~ ??? (fixed, unknown) X = Age at first birth ????????? How big??? mean μ = ??? {x1, x2, x3, x4, … , x400} FORMUL A mean x = 25.6