May. 28, 2023•0 likes•28 views

Report

Software

statistic , it is good for the freshman for statistics

Methods for Applied Macroeconomic Research.pdfComrade15

book.pdfdentistnikhil

Navarro & Foxcroft (2018). Learning statistics with jamovi (1).pdfTerimSura

Applied Statistics With RTracy Drey

An Introduction to Statistical Inference and Its Applications.pdfSharon Collins

A FIRST COURSE IN PROBABILITY.pdfCynthia Velynne

- 1. . Introductory Statistics Explained Edition 1.10CC ©2015 Jeremy Balka This work is licensed under: https://creativecommons.org/licenses/by-nc-nd/4.0/ See http://www.jbstatistics.com/ for the complete set of supporting videos and other supporting material. The complete set of videos is also available at: https://www.youtube.com/user/jbstatistics/videos
- 2. Balka ISE 1.10 2
- 3. Contents 1 Introduction 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Descriptive Statistics . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Inferential Statistics . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Gathering Data 7 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 Populations and Samples, Parameters and Statistics . . . . . . . 9 2.3 Types of Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.1 Simple Random Sampling . . . . . . . . . . . . . . . . . . 11 2.3.2 Other Types of Random Sampling . . . . . . . . . . . . . 13 2.4 Experiments and Observational Studies . . . . . . . . . . . . . . 14 2.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3 Descriptive Statistics 21 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2 Plots for Categorical and Quantitative Variables . . . . . . . . . 23 3.2.1 Plots for Categorical Variables . . . . . . . . . . . . . . . 23 3.2.2 Graphs for Quantitative Variables . . . . . . . . . . . . . 25 3.3 Numerical Measures . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.3.1 Summation Notation . . . . . . . . . . . . . . . . . . . . . 33 3.3.2 Measures of Central Tendency . . . . . . . . . . . . . . . . 34 3.3.3 Measures of Variability . . . . . . . . . . . . . . . . . . . . 37 3.3.4 Measures of Relative Standing . . . . . . . . . . . . . . . 45 3.4 Boxplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.5 Linear Transformations . . . . . . . . . . . . . . . . . . . . . . . . 53 3.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4 Probability 59 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4.2 Basics of Probability . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.2.1 Interpreting Probability . . . . . . . . . . . . . . . . . . . 62 i
- 4. Balka ISE 1.10 CONTENTS ii 4.2.2 Sample Spaces and Sample Points . . . . . . . . . . . . . 63 4.2.3 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4.3 Rules of Probability . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.3.1 The Intersection of Events . . . . . . . . . . . . . . . . . . 65 4.3.2 Mutually Exclusive Events . . . . . . . . . . . . . . . . . . 65 4.3.3 The Union of Events and the Addition Rule . . . . . . . . 66 4.3.4 Complementary Events . . . . . . . . . . . . . . . . . . . 67 4.3.5 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.3.6 Conditional Probability . . . . . . . . . . . . . . . . . . . 69 4.3.7 Independent Events . . . . . . . . . . . . . . . . . . . . . 71 4.3.8 The Multiplication Rule . . . . . . . . . . . . . . . . . . . 73 4.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.5 Bayes’ Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 4.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 82 4.5.2 The Law of Total Probability and Bayes’ Theorem . . . . 85 4.6 Counting rules: Permutations and Combinations . . . . . . . . . 88 4.6.1 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.6.2 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.7 Probability and the Long Run . . . . . . . . . . . . . . . . . . . . 91 4.8 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5 Discrete Random Variables and Discrete Probability Distribu- tions 97 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.2 Discrete and Continuous Random Variables . . . . . . . . . . . . 99 5.3 Discrete Probability Distributions . . . . . . . . . . . . . . . . . . 101 5.3.1 The Expectation and Variance of Discrete Random Variables102 5.4 The Bernoulli Distribution . . . . . . . . . . . . . . . . . . . . . . 110 5.5 The Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . 111 5.5.1 Binomial or Not? . . . . . . . . . . . . . . . . . . . . . . . 114 5.5.2 A Binomial Example with Probability Calculations . . . . 115 5.6 The Hypergeometric Distribution . . . . . . . . . . . . . . . . . . 117 5.7 The Poisson Distribution . . . . . . . . . . . . . . . . . . . . . . . 121 5.7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.7.2 The Relationship Between the Poisson and Binomial Dis- tributions . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.7.3 Poisson or Not? More Discussion on When a Random Vari- able has a Poisson distribution . . . . . . . . . . . . . . . 125 5.8 The Geometric Distribution . . . . . . . . . . . . . . . . . . . . . 127 5.9 The Negative Binomial Distribution . . . . . . . . . . . . . . . . 131 5.10 The Multinomial Distribution . . . . . . . . . . . . . . . . . . . . 133 5.11 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 135
- 5. Balka ISE 1.10 CONTENTS iii 6 Continuous Random Variables and Continuous Probability Dis- tributions 139 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 6.2 Properties of Continuous Probability Distributions . . . . . . . . 143 6.2.1 An Example Using Integration . . . . . . . . . . . . . . . 144 6.3 The Continuous Uniform Distribution . . . . . . . . . . . . . . . 146 6.4 The Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . 150 6.4.1 Finding Areas Under the Standard Normal Curve . . . . . 153 6.4.2 Standardizing Normally Distributed Random Variables . . 158 6.5 Normal Quantile-Quantile Plots . . . . . . . . . . . . . . . . . . . 162 6.5.1 Examples of Normal QQ Plots . . . . . . . . . . . . . . . 163 6.6 Other Important Continuous Probability Distributions . . . . . . 166 6.6.1 The χ2 Distribution . . . . . . . . . . . . . . . . . . . . . 166 6.6.2 The t Distribution . . . . . . . . . . . . . . . . . . . . . . 168 6.6.3 The F Distribution . . . . . . . . . . . . . . . . . . . . . . 169 6.7 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 172 7 Sampling Distributions 175 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 7.2 The Sampling Distribution of the Sample Mean . . . . . . . . . . 180 7.3 The Central Limit Theorem . . . . . . . . . . . . . . . . . . . . . 183 7.3.1 Illustration of the Central Limit Theorem . . . . . . . . . 185 7.4 Some Terminology Regarding Sampling Distributions . . . . . . . 187 7.4.1 Standard Errors . . . . . . . . . . . . . . . . . . . . . . . 187 7.4.2 Unbiased Estimators . . . . . . . . . . . . . . . . . . . . . 187 7.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 188 8 Confidence Intervals 191 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 8.2 Interval Estimation of µ when σ is Known . . . . . . . . . . . . . 194 8.2.1 Interpretation of the Interval . . . . . . . . . . . . . . . . 198 8.2.2 What Factors Affect the Margin of Error? . . . . . . . . . 200 8.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 8.3 Confidence Intervals for µ When σ is Unknown . . . . . . . . . . 205 8.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 205 8.3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 8.3.3 Assumptions of the One-Sample t Procedures . . . . . . . 212 8.4 Determining the Minimum Sample Size n . . . . . . . . . . . . . 218 8.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 220 9 Hypothesis Tests (Tests of Significance) 223 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 9.2 The Logic of Hypothesis Testing . . . . . . . . . . . . . . . . . . 227
- 6. Balka ISE 1.10 CONTENTS iv 9.3 Hypothesis Tests for µ When σ is Known . . . . . . . . . . . . . 229 9.3.1 Constructing Appropriate Hypotheses . . . . . . . . . . . 229 9.3.2 The Test Statistic . . . . . . . . . . . . . . . . . . . . . . 230 9.3.3 The Rejection Region Approach to Hypothesis Testing . . 233 9.3.4 P-values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 9.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 9.5 Interpreting the p-value . . . . . . . . . . . . . . . . . . . . . . . 243 9.5.1 The Distribution of the p-value When H0 is True . . . . . 243 9.5.2 The Distribution of the p-value When H0 is False . . . . . 245 9.6 Type I Errors, Type II Errors, and the Power of a Test . . . . . . 245 9.6.1 Calculating Power and the Probability of a Type II Error 248 9.6.2 What Factors Affect the Power of the Test? . . . . . . . . 253 9.7 One-sided Test or Two-sided Test? . . . . . . . . . . . . . . . . . 254 9.7.1 Choosing Between a One-sided Alternative and a Two- sided Alternative . . . . . . . . . . . . . . . . . . . . . . . 254 9.7.2 Reaching a Directional Conclusion from a Two-sided Al- ternative . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 9.8 Statistical Significance and Practical Significance . . . . . . . . . 257 9.9 The Relationship Between Hypothesis Tests and Confidence Intervals . . . . . . . . . . . . . . . . . . . . . . . . . 258 9.10 Hypothesis Tests for µ When σ is Unknown . . . . . . . . . . . . 260 9.10.1 Examples of Hypothesis Tests Using the t Statistic . . . . 261 9.11 More on Assumptions . . . . . . . . . . . . . . . . . . . . . . . . 266 9.12 Criticisms of Hypothesis Testing . . . . . . . . . . . . . . . . . . 268 9.13 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 271 10 Inference for Two Means 273 10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 10.2 The Sampling Distribution of the Difference in Sample Means . . 276 10.3 Inference for µ1 − µ2 When σ1 and σ2 are Known . . . . . . . . . 277 10.4 Inference for µ1 − µ2 when σ1 and σ2 are unknown . . . . . . . . 279 10.4.1 Pooled Variance Two-Sample t Procedures . . . . . . . . . 280 10.4.2 The Welch Approximate t Procedure . . . . . . . . . . . . 286 10.4.3 Guidelines for Choosing the Appropriate Two-Sample t Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 290 10.4.4 More Examples of Inferences for the Difference in Means . 292 10.5 Paired-Difference Procedures . . . . . . . . . . . . . . . . . . . . 297 10.5.1 The Paired-Difference t Procedure . . . . . . . . . . . . . 300 10.6 Pooled-Variance t Procedures: Investigating the Normality As- sumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 10.7 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 306 11 Inference for Proportions 309
- 7. Balka ISE 1.10 CONTENTS v 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 11.2 The Sampling Distribution of the Sample Proportion . . . . . . . 312 11.2.1 The Mean and Variance of the Sampling Distribution of p̂ 312 11.2.2 The Normal Approximation . . . . . . . . . . . . . . . . . 313 11.3 Confidence Intervals and Hypothesis Tests for the Population Pro- portion p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 11.3.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 11.4 Determining the Minimum Sample Size n . . . . . . . . . . . . . 320 11.5 Inference Procedures for Two Population Proportions . . . . . . . 321 11.5.1 The Sampling Distribution of p̂1 − p̂2 . . . . . . . . . . . . 322 11.5.2 Confidence Intervals and Hypothesis Tests for p1 − p2 . . 323 11.6 More on Assumptions . . . . . . . . . . . . . . . . . . . . . . . . 327 11.7 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 329 12 Inference for Variances 331 12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 12.2 The Sampling Distribution of the Sample Variance . . . . . . . . 334 12.2.1 The Sampling Distribution of the Sample Variance When Sampling from a Normal Population . . . . . . . . . . . . 334 12.2.2 The Sampling Distribution of the Sample Variance When Sampling from Non-Normal Populations . . . . . . . . . . 336 12.3 Inference Procedures for a Single Variance . . . . . . . . . . . . . 337 12.4 Comparing Two Variances . . . . . . . . . . . . . . . . . . . . . . 343 12.4.1 The Sampling Distribution of the Ratio of Sample Variances343 12.4.2 Inference Procedures for the Ratio of Population Variances 345 12.5 Investigating the Effect of Violations of the Normality Assumption 352 12.5.1 Inference Procedures for One Variance: How Robust are these Procedures? . . . . . . . . . . . . . . . . . . . . . . 352 12.5.2 Inference Procedures for the Ratio of Variances: How Ro- bust are these Procedures? . . . . . . . . . . . . . . . . . 355 12.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 357 13 χ2 Tests for Count Data 359 13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 13.2 χ2 Tests for One-Way Tables . . . . . . . . . . . . . . . . . . . . 361 13.2.1 The χ2 Test Statistic . . . . . . . . . . . . . . . . . . . . . 362 13.2.2 Testing Goodness-of-Fit for Specific Parametric Distributions366 13.3 χ2 Tests for Two-Way Tables . . . . . . . . . . . . . . . . . . . . 368 13.3.1 The χ2 Test Statistic for Two-Way Tables . . . . . . . . . 370 13.3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 13.4 A Few More Points . . . . . . . . . . . . . . . . . . . . . . . . . . 375 13.4.1 Relationship Between the Z Test and χ2 Test for 2×2 Tables375 13.4.2 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . 376
- 8. Balka ISE 1.10 CONTENTS vi 13.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 379 14 One-Way Analysis of Variance (ANOVA) 381 14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 14.2 One-Way ANOVA . . . . . . . . . . . . . . . . . . . . . . . . . . 384 14.3 Carrying Out the One-Way Analysis of Variance . . . . . . . . . 386 14.3.1 The Formulas . . . . . . . . . . . . . . . . . . . . . . . . . 386 14.3.2 An Example with Full Calculations . . . . . . . . . . . . . 388 14.4 What Should be Done After One-Way ANOVA? . . . . . . . . . 391 14.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 391 14.4.2 Fisher’s LSD Method . . . . . . . . . . . . . . . . . . . . . 393 14.4.3 The Bonferroni Correction . . . . . . . . . . . . . . . . . . 395 14.4.4 Tukey’s Honest Significant Difference Method . . . . . . . 398 14.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 14.6 A Few More Points . . . . . . . . . . . . . . . . . . . . . . . . . . 406 14.6.1 Different Types of Experimental Design . . . . . . . . . . 406 14.6.2 One-Way ANOVA and the Pooled-Variance t Test . . . . 407 14.6.3 ANOVA Assumptions . . . . . . . . . . . . . . . . . . . . 407 14.7 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 408 15 Introduction to Simple Linear Regression 411 15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 15.2 The Linear Regression Model . . . . . . . . . . . . . . . . . . . . 413 15.3 The Least Squares Regression Line . . . . . . . . . . . . . . . . . 417 15.4 Statistical Inference in Simple Linear Regression . . . . . . . . . 420 15.4.1 Model Assumptions . . . . . . . . . . . . . . . . . . . . . 421 15.4.2 Statistical Inference for the Parameter β1 . . . . . . . . . 422 15.5 Checking Model Assumptions with Residual Plots . . . . . . . . . 424 15.6 Measures of the Strength of the Linear Relationship . . . . . . . 426 15.6.1 The Pearson Correlation Coefficient . . . . . . . . . . . . 426 15.6.2 The Coefficient of Determination . . . . . . . . . . . . . . 429 15.7 Estimation and Prediction Using the Fitted Line . . . . . . . . . 431 15.8 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 15.9 A Complete Example . . . . . . . . . . . . . . . . . . . . . . . . . 435 15.10Outliers, Leverage, and Influential Points . . . . . . . . . . . . . . 437 15.11Some Cautions about Regression and Correlation . . . . . . . . . 439 15.11.1Always Plot Your Data . . . . . . . . . . . . . . . . . . . 439 15.11.2Avoid Extrapolating . . . . . . . . . . . . . . . . . . . . . 440 15.11.3Correlation Does Not Imply Causation . . . . . . . . . . . 441 15.12A Brief Multiple Regression Example . . . . . . . . . . . . . . . . 442 15.13Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 446
- 9. Chapter 1 Introduction “I have been impressed with the urgency of doing. Knowing is not enough; we must apply. Being willing is not enough; we must do.” -Leonardo da Vinci 1
- 10. Balka ISE 1.10 1.1. INTRODUCTION 2 1.1 Introduction When first encountering the study of statistics, students often have a preconceived— and incorrect—notion of what the field of statistics is all about. Some people think that statisticians are able to quote all sorts of unusual statistics, such as 32% of undergraduate students report patterns of harmful drinking behaviour, or that 55% of undergraduates do not understand what the field of statistics is all about. But the field of statistics has little to do with quoting obscure percent- ages or other numerical summaries. In statistics, we often use data to answer questions like: • Is a newly developed drug more effective than one currently in use? • Is there a still a sex effect in salaries? After accounting for other relevant variables, is there a difference in salaries between men and women? Can we estimate the size of this effect for different occupations? • Can post-menopausal women lower their heart attack risk by undergoing hormone replacement therapy? To answer these types of questions, we will first need to find or collect appropriate data. We must be careful in the planning and data collection process, as unfortu- nately sometimes the data a researcher collects is not appropriate for answering the questions of interest. Once appropriate data has been collected, we summa- rize and illustrate it with plots and numerical summaries. Then—ideally—we use the data in the most effective way possible to answer our question or questions of interest. Before we move on to answering these types of questions using statistical in- ference techniques, we will first explore the basics of descriptive statistics. 1.2 Descriptive Statistics In descriptive statistics, plots and numerical summaries are used to describe a data set. Example 1.1 Consider a data set representing final grades in a large introduc- tory statistics course. We may wish to illustrate the grades using a histogram or a boxplot,1 as in Figure 1.1. 1 You may not have encountered boxplots before. Boxplots will be discussed in detail in Sec- tion 3.4. In their simplest form, they are plots of the five-number summary: minimum, 25th percentile, median, 75th percentile, and the maximum. Extreme values are plotted in indi- vidually. They are most useful for comparing two or more distributions.
- 11. Balka ISE 1.10 1.3. INFERENTIAL STATISTICS 3 20 40 60 80 100 0 40 80 120 Final Grade Frequency (a) Histogram of final grades. 25 50 75 100 Final Grade (b) Boxplot of final grades. Figure 1.1: Boxplot and histogram of final grades in an introductory statistics course. Plots like these can give an effective visual summary of the data. But we are also interested in numerical summary statistics, such as the mean, median, and variance. We will investigate descriptive statistics in greater detail in Chapter 3. But the main purpose of this text is to introduce statistical inference concepts and techniques. 1.3 Inferential Statistics The most interesting statistical techniques involve investigating the relationship between variables. Let’s look at a few examples of the types of problems we will be investigating. Example 1.2 Do traffic police officers in Cairo have higher levels of lead in their blood than that of other police officers? A study2 investigated this question by drawing random samples of 126 Cairo traffic officers and 50 officers from the suburbs. Lead levels in the blood (µg/dL) were measured. The boxplots in Figure 1.2 illustrate the data. Boxplots are very useful for comparing the distributions of two or more groups. The boxplots show a difference in the distributions—it appears as though the distribution of lead in the blood of Cairo traffic officers is shifted higher than that of officers in the suburbs. In other words, it appears as though the traffic officers have a higher mean blood lead level. The summary statistics are illustrated in Table 1.1.3 2 Kamal, A., Eldamaty, S., and Faris, R. (1991). Blood level of Cairo traffic policemen. Science of the Total Environment, 105:165–170. The data used in this text is simulated data based on the summary statistics from that study. 3 The standard deviation is a measure of the variability of the data. We will discuss it in detail in Section 3.3.3.
- 12. Balka ISE 1.10 1.3. INFERENTIAL STATISTICS 4 10 20 30 40 Lead Concentration Cairo Traffic Suburbs Figure 1.2: Lead levels in the blood of Egyptian police officers. Cairo Suburbs Number of observations 126 50 Mean 29.2 18.2 Standard deviation 7.5 5.8 Table 1.1: Summary statistics for the blood lead level data. In this scenario there are two main points of interest: 1. Estimating the difference in mean blood lead levels between the two groups. 2. Testing if the observed difference in blood lead levels is statistically signifi- cant. (A statistically significant difference means it would be very unlikely to observe a difference of that size, if in reality the groups had the same true mean, thus giving strong evidence the observed effect is a real one. We will discuss this notion in much greater detail later.) Later in this text we will learn about confidence intervals and hypothesis tests—statistical inference techniques that will allow us to properly address these points of interest. Example 1.3 Can self-control be restored during intoxication? Researchers in- vestigated this in an experiment with 44 male undergraduate student volunteers.4 The males were randomly assigned to one of 4 treatment groups (11 to each group): 1. An alcohol group, receiving drinks containing a total of 0.62 mg/kg alcohol. (Group A) 2. A group receiving drinks with the same alcohol content as Group A, but also containing 4.4 mg/kg of caffeine. (Group AC) 4 Grattan-Miscio, K. and Vogel-Sprott, M. (2005). Alcohol, intentional control, and inappropri- ate behavior: Regulation by caffeine or an incentive. Experimental and Clinical Psychophar- macology, 13:48–55.
- 13. Balka ISE 1.10 1.3. INFERENTIAL STATISTICS 5 3. A group receiving drinks with the same alcohol content as Group A, but also receiving a monetary reward for success on the task. (Group AR) 4. A group told they would receive alcoholic drinks, but instead given a placebo (a drink containing a few drops of alcohol on the surface, and misted to give a strong alcoholic scent). (Group P) After consuming the drinks and resting for a few minutes, the participants car- ried out a word stem completion task involving “controlled (effortful) memory processes”. Figure 1.3 shows the boxplots for the four treatment groups. Higher scores are indicative of greater self-control. A AC AR P -0.4 -0.2 0.0 0.2 0.4 0.6 Score on Task Figure 1.3: Boxplots of word stem completion task scores. The plot seems to show a systematic difference between the groups in their task scores. Are these differences statistically significant? How unlikely is it to see differences of this size, if in reality there isn’t a real effect of the different treat- ments? Does this data give evidence that self-control can in fact be restored by the use of caffeine or a monetary reward? In Chapter 14 we will use a statistical inference technique called ANOVA to help answer these questions. Example 1.4 A study5 investigated a possible relationship between eggshell thickness and environmental contaminants in brown pelican eggs. It was sus- pected that higher levels of contaminants would result in thinner eggshells. This study looked at the relationship of several environmental contaminants on the thickness of shells. One contaminant was DDT, measured in parts per million of the yolk lipid. Figure 1.4 shows a scatterplot of shell thickness vs. DDT in a sample of 65 brown pelican eggs from Anacapa Island, California. There appears to be a decreasing relationship. Does this data give strong ev- 5 Risebrough, R. (1972). Effects of environmental pollutants upon animals other than man. In Proceedings of the Sixth Berkeley Symposium on Mathematical Statistics and Probability.
- 14. Balka ISE 1.10 1.3. INFERENTIAL STATISTICS 6 0 500 1000 1500 2000 2500 3000 0.1 0.2 0.3 0.4 0.5 Shell Thickness (mm) DDT (ppm) Figure 1.4: Shell thickness (mm) vs. DDT (ppm) for 65 brown pelican eggs. idence of a relationship between DDT contamination and eggshell thickness? Can we use the relationship to help predict eggshell thickness for a given level of DDT contamination? In Chapter 15 we will use a statistical method called linear regression analysis to help answer these questions. In the world of statistics—and our world at large for that matter—we rarely if ever know anything with certainty. Our statements and conclusions will involve a measure of the reliability of our estimates. We will make statements like we can be 95% confident that the true difference in means lies between 4 and 10, or, the probability of seeing the observed difference, if in reality the new drug has no effect, is less than 0.001. So probability plays an important role in statistics, and we will study the basics of probability in Chapter 4. In our study of probability, keep in mind that we have an end in mind—the use of probability to quantify our uncertainty when attempting to answer questions of interest.
- 16. Balka ISE 1.10 8 Supporting Videos For This Chapter
- 17. Balka ISE 1.10 2.1. INTRODUCTION 9 2.1 Introduction In this chapter we will investigate a few important concepts in data collection. Some of the concepts introduced in this chapter will be encountered throughout the remainder of this text. 2.2 Populations and Samples, Parameters and Statis- tics In 1994 the Center for Science in the Public Interest (CSPI) investigated nutri- tional characteristics of movie theatre popcorn, and found that the popcorn was often loaded with saturated fats. The study received a lot of media attention, and even motivated some theatre chains to change how they made popcorn. In 2009, the CSPI revisited movie theatre popcorn.1 They found that in addi- tion to the poor stated nutritional characteristics, in reality the popcorn served at movie theatres was nutritionally worse than the theatre companies claimed. What was served in theatres contained more calories, fat, and saturated fat than was stated by the companies. Suppose that you decide to follow up on this study in at your local theatre. Suppose that your local movie theatre claims that a large untopped bag of their popcorn contains 920 calories on average. You spend a little money to get a sam- ple of 20 large bags of popcorn, have them analyzed, and find that they contain 1210 calories on average. Does this provide strong evidence that the theatre’s claimed average of 920 calories false? What values are reasonable estimates of the true mean calorie content? These questions cannot be answered with the information we have at this point, but with a little more information and a few essential tools of statistical inference, we will learn how to go about answering them. To speak the language of statistical inference, we will need a few definitions: • Individuals or units or cases are the objects on which a measurement is taken. In this example, the bags of popcorn are the units. • The population is the set of all individuals or units of interest to an investigator. In this example the population is all bags of popcorn of this type. A population may be finite (all 25 students in a specific kindergarten 1 http://www.cspinet.org/nah/articles/moviepopcorn.html
- 18. Balka ISE 1.10 2.3. TYPES OF SAMPLING 10 class, for example) or infinite (all bags of popcorn that could be produced by a certain process, for example).2 • A parameter is a numerical characteristic of a population. Examples: – The mean calorie content of large bags of popcorn made by a movie theatre’s production process. – The mean weight of 40 year-old Canadian males. – The proportion of adults in the United States that approve of the way the president is handling his job. In practice it is usually impractical or impossible to take measurements on the entire population, and thus we typically do not know the values of parameters. Much of this text is concerned with methods of parameter estimation. • A sample is a subset of individuals or units selected from the population. The 20 bags of popcorn that were selected is a sample. • A statistic is a numerical characteristic of a sample. The sample mean of the 20 bags (1210 calories) is a statistic. In statistical inference we attempt to make meaningful statements about popu- lation parameters based on sample statistics. For example, do we have strong evidence that a food item’s average calorie content is greater than what the producer claims? A natural and important question that arises is: How do we go about obtaining a proper sample? This is often not an easy question to answer, but there are some important considerations to take into account. Some of these considerations will be discussed in the following sections. 2.3 Types of Sampling Suppose a right-wing radio station in the United States asks their listeners to call in with their opinions on how the president is handling his job. Eighteen people call in, with sixteen saying they disapprove. 2 Sometimes the term population is used to represent the set of individuals or objects, and sometimes it is used to represent the set of numerical measurements on these individuals or objects. For example, if we are interested in the weights of 25 children in a specific kindergarten class, then the term population might be used to represent the 25 children, or it might be used to represent the 25 weight measurements on these children. In practice, this difference is unlikely to cause any confusion.
- 19. Balka ISE 1.10 2.3. TYPES OF SAMPLING 11 How informative is this type of sample? If we are hoping to say something about the opinion of Americans in general, it is not very informative. This sample is hopelessly biased (not representative of the population of interest). We might say that the sampled population is different from the target population. (Listeners of a right-wing radio station are not representative of Americans as a whole.) What if we consider the population of interest to be listeners of this right-wing radio station? (Which would be the case if we only wish to make statements about listeners of this station.) There is still a major issue: the obtained sample is a voluntary response sample (listeners chose whether to respond or not— they self-selected to be part of the sample). Voluntary response samples tend to be strongly biased; individuals are more likely to respond if they feel very strongly about the issue and less likely to respond if they are indifferent. Student course evaluations are another example of a voluntary response sample, and individuals that love or hate a professor may be more likely to fill in a course evaluation than those who think the professor was merely average. Self-selection often results in a hopelessly biased sample. It is one potential source of bias in a sample, but there are many other potential sources. For example, an investigator may consciously or subconsciously select a sample that is likely to support their hypothesis. This is most definitely something an honest statistician tries to avoid. So how do we avoid bias in our sample? We avoid bias by randomly selecting members of the population for our sample. Using a proper method of random sampling ensures that the sample does not have any systematic bias. There are many types of random sampling, each with its pros and cons. One of the simplest and most important random sampling methods is simple random sampling. In the statistical inference procedures we encounter later in this text, oftentimes the procedures will be appropriate only if the sample is a simple random sample (SRS) from the population of interest. Simple random sampling is discussed in the next section. 2.3.1 Simple Random Sampling Simple random sampling is a method used to draw an unbiased sample from a population. The precise definition of a simple random sample depends on whether we are sampling from a finite or infinite population. But there is one constant: no member of the population is more or less likely to be contained in the sample than any other member. In a simple random sample of size n from a finite population, each possible sample of size n has the same chance of being selected. An implication of this is that
- 20. Balka ISE 1.10 2.3. TYPES OF SAMPLING 12 every member of the population has the same chance of being selected. Simple random samples are typically carried out without replacement (a member of the population cannot appear in the sample more than once). Example 2.1 Let’s look at a simple fictitious example to illustrate simple ran- dom sampling. Suppose we have a population of 8 goldfish: Goldfish number 1 2 3 4 5 6 7 8 Goldfish name Mary Hal Eddy Tony Tom Pete Twiddy Jemmy With such a small population size we may be able to take a measurement on every member. (We could find the mean weight of the population, say, since it would not be overly difficult or time consuming to weigh all 8 goldfish.) But most often the population size is too large to measure all members. And sometimes even for small populations it is not possible to observe and measure every member. In this example suppose the desired measurement requires an expensive necropsy, and we have only enough resources to perform three necropsies. We cannot afford to measure every member of the population, and to avoid bias we may choose to draw a simple random sample of 3 goldfish. How do we go about drawing a simple random sample of 3 goldfish from this population? In the modern era, we simply get software to draw the simple random sample for us.34 The software may randomly pick Mary, Tony, and Jemmy. Or Pete, Twiddy, and Mary, or any other combination of 3 names. Since we are simple random sampling, any combination of 3 names has the same chance of being picked. If we were to list all possible samples of size 3, we would see that there are 56 possible samples. Any group of 3 names will occur with probability 1 56, and any individual goldfish will appear in the sample with probability 3 8.5 Many statistical inference techniques assume that the data is the result of a sim- ple random sample from the population of interest. But at times it is simply not possible to carry out this sampling method. (For example, in practice we couldn’t possibly get a simple random sample of adult dolphins in the Atlantic ocean.) So at times we may not be able to properly randomize, and we may simply try to minimize obvious biases and hope for the best. But this is danger- ous, as any time we do not carry out a proper randomization method, bias may be introduced into the sample and the sample may not be representative of the 3 For example, in the statistical software R, if the names are saved in an object called gold- fish.names, the command sample(goldfish.names,3) would draw a simple random sample of 3 names. 4 In the olden days, we often used a random number table to help us pick the sample. Although random number tab