1 / 106

Comparative Analysis of Haircut Prices in Men and Women

This chapter explores the comparison of quantitative response variables, specifically haircut prices, between men and women. It includes a simulation-based approach and a theory-based approach to comparing means. Several graphical representations and statistical calculations are used to analyze the data. The chapter also discusses the difference between quartiles and the inter-quartile range, as well as the construction of boxplots.

dguzman
Download Presentation

Comparative Analysis of Haircut Prices in Men and Women

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 6:Comparing Two Means 6.1: Comparing Two Groups: Quantitative Response 6.2: Comparing Two Means: Simulation-Based Approach 6.3: Comparing Two Means: Theory-Based Approach

  2. Section 6.1 Exploring Quantitative Data

  3. Quantitative vs. Categorical Variables • Categorical • Labels for which arithmetic does not make sense. • Sex, ethnicity, eye color… • Quantitative • You can add, subtract, etc. with the values. • Age, height, weight, distance, time…

  4. Graphs for a Single Variable Categorical Quantitative Bar Graph Dot Plot

  5. Comparing Two Groups Graphically Categorical Quantitative

  6. Notation Check Statistics • (x-bar) Sample Average or Mean • (p-hat) Sample Proportion Parameters • (mu) Population Average or Mean • (pi) Population Proportion or Probability Statistics summarize a sample and parameters summarize a population

  7. Quartiles • The value for which 25% of the data lie below that value is called the lower quartile (or 25th percentile). • Similarly, the value for which 25% of the data lie above that value is called the upper quartile (or 75th percentile). • Quartiles can be calculated by determining the median of the values above/below the location of the overall median.

  8. IQR and Five-Number Summary • The difference between the quartiles is called the inter-quartile range (IQR), another measure of variability along with standard deviation. • The five-number summary for the distribution of a quantitative variable consists of the minimum, lower quartile, median, upper quartile, and maximum. • Find five-number summary and make boxplot for the height data below. 61, 62, 62, 62, 62, 63, 64, 64, 64, 65, 65, 65, 65, 66, 67, 68, 68, 69, 69, 69, 69, 70, 71, 71, 72, 73, 75, 76, 76, 77

  9. Old Faithful Inter-Eruption Times • How do the five-number summary and IQR differ for inter-eruption times between 1978 and 2003?

  10. Old Faithful Inter-Eruption Times • 1978 IQR = 81 – 58 = 23 • 2003 IQR = 98 – 87 = 11

  11. Boxplots Min Qlower Med Qupper Max

  12. Boxplots (Outliers) • A data value that is more than 1.5 × IQR above the upper quartile or below the lower quartile is considered an outlier. • When these occur, the whiskers on a boxplot extend out to the farthest value not considered an outlier and outliers are represented by a dot or an asterisk.

  13. Cancer Pamphlet Reading Levels • What is the: • Median reading level? • Mean reading level? • Are the data skewed one way or the other?

  14. Skewed right • Mean to the right of median

  15. Learning Objectives for Section 6.1 • Calculate or estimate the mean, median, quartiles, five number summary and inter-quartile range from a data set and understand what these are measuring. • Be able to construct a boxplot. • When comparing two quantitative distributions, identify which has the larger mean, median, standard deviation, and inter-quartile range. • Identify if there is likely an association between a binary categorical variable and a quantitative response variable.

  16. Exploration 6.1: Haircut Prices (pg 327)

  17. Exploration 6.1: Haircut Prices (pg 327) Do women pay more for haircuts? • What are the variables, types and roles? • Random sampling, random assignment or neither? • Experiment or observational study? • Approximately what are the means? • Which has the larger standard deviation? • Do questions 8-19

  18. Section 6.2 Comparing Two Means: Simulation-Based Approach

  19. Comparison to Proportions • We will be comparing means, much the same way we compared two proportions using randomization techniques with cards and an applet. • The difference here is that the response variable is quantitative (the explanatory is still binary). So if cards are used to develop a null distribution, numbers go on the cards instead of words.

  20. Bicycling to Work Dr. Jeremy Groves with his steel frame bike (left) and carbon frame bike (right). Example 6.2

  21. Bicycling to Work • Does bicycle weight affect commute time? • British Medical Journal (2010) presented the results of a randomized experiment conducted by Jeremy Groves. • Groves wanted to know if bicycle weight affected his commute to work. • For 56 days (January to July) Groves tossed a coin to decide if he would bike the 27 miles to work on his carbon frame bike (20.9lbs) or steel frame bicycle (29.75lbs). • He recorded the commute time for each trip.

  22. Bicycling to Work • What are the observational units? • Each trip to work on the 56 different days. • What are the explanatory and response variables? • Explanatory is which bike Groves rode (categorical – binary) • Response variable is his commute time (quantitative)

  23. Bicycling to Work • Null hypothesis: There is no association between which bike is used and commute time • Commute time is not affected by which bike is used. • Alternative hypothesis: There is an association between which bike is used and commute time • Commute time is affected by which bike is used.

  24. Bicycling to Work • In chapter 5 we used the difference in proportions of “successes” between the two groups. • Now we will compare the difference in averages between the two groups. • The parameters of interest are:  • µcarbon = Long term average commute time with carbon frame bike • µsteel = Long term average commute time with steel frame bike.

  25. Bicycling to Work • Mu (µ) is the parameter for population mean. • Using the symbols µcarbon and µsteel, restate the hypotheses: • H0: µcarbon = µsteel (µcarbon – µsteel = 0) • Ha: µcarbon ≠ µsteel (µcarbon – µsteel ≠ 0)

  26. Bicycling to Work Remember • The hypotheses are about the association between commute time and bike used, not just his 56 trips. • Hypotheses are always about populations or processes, not the sample data.

  27. Bicycling to Work

  28. Bicycling to Work • The sample average and variability for commute time was higher for the carbon frame bike • Does this indicate a tendency? • Or could a higher average just come from the random assignment. Perhaps the carbon frame bike was randomly assigned to days where traffic was heavier or weather slowed down Dr. Groves on his way to work?

  29. Bicycling to Work • Is it possible to get a difference of 0.53 minutes if commute time isn’t affected by the bike used? • The same type of question was asked in Chapter 5 for categorical response variables. • The same answer. Yes it’s possible, how likely though?

  30. Bicycling to Work • The 3S Strategy Statistic: • Choose a statistic: • The observed difference in average commute times carbon – steel = 108.34 - 107.81 = 0.53 minutes

  31. Bicycling to Work Simulation: • We can simulate this study with index cards. • Write all 56 times on 56 cards. • Shuffle all 56 cards and randomly redistribute into two stacks: • One with 26 cards (representing the times for the carbon-frame bike) • Another 30 cards (representing the times for the steel-frame bike)

  32. Bicycling to Work Simulation (continued): • Shuffling assumes the null hypothesis of no association between commute time and bike • After shuffling we calculate the difference in the average times between the two stacks of cards. • Repeat this many times to develop a null distribution • Let’s see what this looks like

  33. Carbon Frame Steel Frame 116 116 109 118 113 116 114 119 123 113 110 113 104 113 105 111 113 106 118 109 104 111 111 110 105 106 103 103 112 110 103 102 98 109 108 101 102 100 102 107 102 112 101 106 102 105 103 111 106 102 105 108 105 106 107 106 mean = 108.34 mean = 108.27 mean = 107.81 mean = 107.87 108.27 – 107.87 = 0.40 Shuffled Differences in Means

  34. Carbon Frame Steel Frame 116 116 109 118 113 116 114 119 123 113 110 113 104 113 105 111 113 106 118 109 104 111 111 110 105 106 103 103 112 110 103 102 98 109 108 101 102 100 102 107 102 112 101 106 102 105 103 111 106 102 105 108 105 106 107 106 mean = 107.69 mean = 108.27 mean = 107.87 mean = 108.37 107.69 – 108.37 = -0.68 Shuffled Differences in Means

  35. Carbon Frame Steel Frame 116 116 109 118 113 116 114 119 123 113 110 113 104 113 105 111 113 106 118 109 104 111 111 110 105 106 103 103 112 110 103 102 98 109 108 101 102 100 102 107 102 112 101 106 102 105 103 111 106 102 105 108 105 106 107 106 mean = 107.69 mean = 107.97 mean = 108.13 mean = 108.37 107.97 – 108.13 = -0.16 Shuffled Differences in Means

  36. More Simulations -2.11 -1.51 -1.93 -1.53 -2.50 -1.11 Nineteen of our simulated statistics were as or more extreme than our observed difference in means of 0.53, hence our p-value for this null distribution is 19/30 = 0.63. -1.21 -1.20 -1.10 -0.31 -0.52 -0.98 0.02 -0.64 0.71 2.53 1.90 0.22 0.38 0.44 1.89 0.13 1.50 0.55 1.46 0.81 1.79 Shuffled Differences in Means

  37. Multiple Means Applet • Let’s see how this process is done with the multiple means applet. • We will need to get the Bike Times data and put it in the applet.

  38. Bicycling to Work • We should have obtained a p-value of about 0.72. • What does this p-value mean? • If mean commute times for the bikes are the same in the long run, and we repeated random assignment of the lighter bike to 26 days and the heavier to 30 days, a difference as extreme as 0.53 minutes or more would occur in about 72% of the repetitions. • Therefore, we don’t have evidence that the commute times for the two bikes will differ in the long run.

  39. Bicycling to Work • Have we proven that the bike Groves chooses is not associated with commute time? (Can we conclude the null?) • No, a large p-value is not “strong evidence that the null hypothesis is true.” • It suggests that the null hypothesis is plausible • There could be long-term difference just like we saw, but it is just very small.

  40. Bicycling to Work • Let’s use the 2SD Method to generate a confidence interval for the long-run difference in average commuting time. • Sample difference in means ± 2⨯SD of the simulated null distribution • Our standard deviation for the null distribution was about 1.47 • 0.53 ± 2(1.47)= 0.53 ± 2.94 • -2.41 to 3.47. • What does this mean? (next page)

  41. Bicycling to Work • We are 95% confident that the true difference (carbon – steel) in average commuting times is between -2.41 and 3.47 minutes. Carbon frame bike is between 2.41 minutes faster and 3.47 minutes slower than the steel frame bike. • Does it make sense that the interval contains 0 based on our p-value?

  42. Bicycling to Work Scope of conclusions • Can we generalize our conclusion to a larger population? • Two Key questions: • Was the sample randomly obtained from a larger population? • Were the observational units randomly assigned to treatments?

  43. Bicycling to Work • Was the sample randomly obtained from a larger population? • No, Groves commuted on consecutive days which didn’t include all seasons. • Were the observational units randomly assigned to treatments? • Yes, he flipped a coin for the bike • We can draw cause-and-effect conclusions

  44. Bicycling to Work • We can’t generalize beyond Groves and his two bikes. • A limitation is that this study is that it’s not double-blind • The researcher and the subject (which happened to be the same person) were not blind to which treatment was being used. • Perhaps Groves likes his old bike and wanted to show it was just as good as the new carbon-frame bike for commuting to work.

  45. Learning Objectives for Section 6.2 • State the null and the alternative hypotheses in terms of “no association” versus “there is an association” as well as in terms of comparing means for two categories of the explanatory variable (that is, µ1 and µ2). • Describe how to use cards to simulate what outcomes (in terms of difference in means or median) are to be expected in repeated random assignments, if there is no association between the two variables. • Use the Multiple Means applet to conduct a simulation of the null hypothesis and be able to read output from the Multiple Means applet.

  46. Learning Objectives for Section 6.2 • Implement the 3S strategy to compare two means: find a statistic, simulate, and compute the strength of evidence against observed study results happening by chance alone. • Find and interpret the standardized statistic and the p-value for a test of two means. • State a complete conclusion about the alternative hypothesis (and null hypothesis) based on the p-value and/or standardized statistic and the study design including statistical significance, estimation, generalizability and causation. • Use the 2SD method to find a 95% confidence interval for the difference in population means for two "treatment" groups, and interpret the interval in the context of the study. Interpret what it means for the 95% confidence interval for difference in means to contain zero.

  47. Exploration • Exploration 6.2: Lingering Effects of Sleep Deprivation

  48. Lingering Effects of Sleep Deprivation • Can you function well the day after a sleepless night? • What about a couple of days later? • Can you recover from a sleepless night by getting a full night’s sleep on the following nights? • This last question about the lingering effects of sleep deprivation is what researchers Stickgold, James, and Hobson investigated.

  49. Sleep Deprivation • The 21 subjects were shown either screen (a) or (b) for 17ms, then a blank screen for various lengths of times, then (c) for 17ms. • The minimum time of the blank screen was recorded where they achieved 80% accuracy in describing whether or not they saw T or L and horizontal or vertical array of diagonals

  50. 1 second blank screen • Is there are vertical array of lines and an L or is there a horizontal array of lines and a T on the first screen? • The first screen will appear for 17ms. • Followed by a blank screen for 1 s. • Followed by a masking screen.

More Related