Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using JMP Scripts in Introductory Statistics* Amy G. Froelich Iowa State University William M. Duckworth Creighton University Concepts from Introductory.

Similar presentations


Presentation on theme: "Using JMP Scripts in Introductory Statistics* Amy G. Froelich Iowa State University William M. Duckworth Creighton University Concepts from Introductory."— Presentation transcript:

1 Using JMP Scripts in Introductory Statistics* Amy G. Froelich Iowa State University William M. Duckworth Creighton University Concepts from Introductory Statistics: Advantages over Java applets available on web: Disadvantages over Java applets available on web: Relationship Between Mean and Median Normal Quantile Plots Regression and Residual Plots Sampling Distributions Central Limit Theorem Normal Distribution vs. t distribution Confidence Intervals Variability Relationship Between Sample Size and Width of CI Connection Between Coverage Rates and Confidence Level Hypothesis Testing Connections Between CIs and Two-Sided Testing Between Rejection Rates and α Relationships Among Testing Conditions and Power Sample Size Alpha Level Difference Between True and Hypothesized Parameter Contingency Table Test for Two Proportions Fisher’s Exact Test Script output in same format as JMP data analysis output. Flexibility to create script to match and expand different activities. Internet access not required. Programming knowledge of JMP scripting language required. Dependent upon JMP platform. Some Resources for JMP Scripts: JMP Scripting Library http://www.jmp.com/support/downloads/jmp_scripting_library/ Statistics Education Materials Repository at Iowa State University http://stated.stat.iastate.edu/ Commercially Available Scripts Predictum Management Sciences (www.predictum.com) *This material is based upon work supported by the National Science Foundation under Grant No. 0231322.

2 Inference for the Mean 0123456789 006867727463686768 65 0167646367666467686966 0270696260656667646372 0369667362687266696664 0464676569676861636570 0566 6869626966626165 0664686267626566 6162 0762636864586671676667 086564 62647263716866 096263686564676264 63 1067687064706763687063 1167 657270646266 70 1268647065646961666267 136265 60636167 6465 1467656761636671646061 156567656665636469 66 1660716962606766686267 1770676070637067616564 1863 6466656665646869 19656070626768636563 Population of 200 Female Heights Hands-On Activity: Confidence Interval Script: Hypothesis Testing Script: 95 out of 100 CIs Contain the True Population Mean Height 100 95% CIs for the Population Mean Height 4 out of 100 z-test statistics will reject Ho.29 out of 100 z-test statistics will reject Ho. 100 z-test statistics with sample size = 25 and α = 0.05 Type I error Replicates Hands-on Activity Ho: μ = μ TRUE vs. Ha: μ ≠ μ TRUE Vary: sample size (5, 25, 50) alpha level (0.1, 0.05, 0.01) Power Ho: μ = μ FALSE vs. Ha: μ ≠ μ FALSE Vary: sample size (5, 25, 50) alpha level (0.1, 0.05, 0.01) Value of μ FALSE Replicates Hands-on Activity Sample from Larger Population 80%, 90%, 95% CIs Population Mean Height of Females Example Coverage Rates 80% CI – 84/100 90% CI – 91/100 95% CI – 95/100 Random samples from this population Sample sizes = 10 and 20 Two samples of each size per group Sample Mean Height Calculate 90% CIs for Population Mean Height Conduct Hypothesis Test for Population Mean Height Under True Null Hypothesis (α = 0.1) Learning Outcomes Discover variability of CI Discover effect of sample size on CI width Hypothesize about meaning of confidence Hypothesize about Type I error and alpha level

3 Inference for the Proportion 0123456789 00BlueBrownBlueBrownGreenBlueBrownGreen Brown 01HazelGreenBlueHazelBrownBlueBrown Blue 02BlueBrownBlueBrownHazelGreenBrown Green 03GreenBrown GreenBrown GreenHazelGreen 04BrownBlueOtherBlue HazelBrownHazelGreenBlue 05Brown Blue BrownBlueBrownBlue 06GreenBlueHazelBrownGreen Blue 07GreenHazelBlueHazelBrownGreen BlueBrownGreen 08BrownHazelBrownBlue Brown HazelBrown 09BlueGreenBlueGreenBrownOtherBrownBlue Brown 10BlueBrown HazelBlueBrown BlueGreenBrown 11BrownBlue OtherGreenBlueHazelGreenBrown 12Blue HazelBlueHazelBrownOtherBlueGreenBlue 13BlueBrownHazelBrownBlueHazelBrownBlueGreenBlue 14BrownHazelBlueHazel BlueBrownBlue Brown 15Brown Hazel GreenBrown Blue 16GreenHazelBlueGreenBrown HazelBlue 17Green OtherBrownGreenBrown GreenBrown 18Green Blue BrownGreenHazelBrownGreen 19BrownHazelBlue HazelBlueBrown Green Population of 200 Eye Colors Confidence Interval Script: Hands-on Activity: Plus 4 Method Confidence Interval Script: Random samples from this population Sample sizes = 10 and 20 Two samples of each size per group Proportion of each sample with Blue Eyes Calculate 90% confidence intervals for Proportion in population with Blue Eyes Learning Outcomes Discover variability of CI Discover effect of sample size on CI width Hypothesize about meaning of confidence 100 90% Confidence Intervals for Proportion of Population with Blue Eye Color 89 of the 100 Confidence Intervals Contain the True Proportion of Population with Blue Eye Color Replicates Hands-On Activity Sample from Larger Population 90%, 95%, 99% CI Proportion in Population with Blue Eye Color Example Coverage Rates 89/100 – 90% CI 97/100 – 95% CI 98/100 – 99% CI 100 95% Traditional CIs for Proportion of Population with Hazel Eye Color 81 of the 100 Traditional CIs Contain the True Proportion of Population with Hazel Eye Color 100 95% Plus 4 Method CIs for Proportion of Population with Hazel Eye Color 91 of the 100 Plus 4 Method CIs Contain the True Proportion of Population with Hazel Eye Color Sample from Larger Population Sample Size = 10 95% CI for Proportion in Population with Hazel Eye Color Compare Two Methods Traditional Plus 4 Method Example Coverage Rates Traditional: 81/100 Plus 4 Method: 91/100

4 Randomization in the Design of Experiments A = 130 B = 118 A = 149 B = 137 A = 139 B = 127 A = 167 B = 155 A = 149 B = 137 A = 157 B = 145 A = 149 B = 137 A = 133 B = 121 A = 152 B = 140 A = 143 B = 131 A = 159 B = 147 A = 148 B = 136 A = 141 B = 129 A = 156 B = 144 A = 137 B = 125 A = 158 B = 146 A = 144 B = 132 A = 160 B = 148 A = 150 B = 138 A = 142 B = 130 A = 155 B = 143 A = 148 B = 136 A = 164 B = 152 A = 145 B = 133 A = 139 B = 127 A = 155 B = 143 A = 139 B = 127 A = 159 B = 147 A = 149 B = 137 A = 165 B = 153 A = 155 B = 143 A = 138 B = 126 A = 150 B = 138 A = 149 B = 137 A = 157 B = 145 A = 148 B = 136 B 118 A 149 A 139 A 167 A 149 A 157 B 137 B 121 B 140 A 143 B 147 B 136 B 129 B 144 A 137 B 146 B 132 A 160 B 138 A 142 A 155 B 136 A 164 A 145 A 139 A 155 A 139 A 159 B 137 A 165 B 143 B 126 B 138 B 137 B 145 A 148 The “True” Yields Per Plot for Each VarietyOne Random Assignment of Varieties to Plots Hands-on Activity*: Hypothesis Testing Script**: Comparison of Mean Yields of Two Corn Varieties Convenience AssignmentAlternating Assignment A 130 A 149 A 139 B 155 B 137 B 145 A 149 A 133 A 152 B 131 B 147 B 136 A 141 A 156 A 137 B 146 B 132 B 148 A 150 A 142 A 155 B 136 B 152 B 133 A 139 A 155 A 139 B 147 B 137 B 153 A 155 A 138 A 150 B 137 B 145 B 136 A 130 B 137 A 139 B 155 A 149 B 145 B 137 A 133 B 140 A 143 B 147 A 148 A 141 B 144 A 137 B 146 A 144 B 148 B 138 A 142 B 143 A 148 B 152 A 145 A 139 B 143 A 139 B 147 A 149 B 153 B 143 A 138 B 138 A 149 B 145 A 148 No significant difference in mean yields between two varieties. The Importance of Random Assignment: Variety A > Variety B by 12 bushels in each plot. Significant difference in mean yields between two varieties. Replicates Hands-on Activity Random Assignments of Varieties to Plots Distribution of Sample Mean Differences Between Varieties Number of Rejections of Null Hypothesis of Equal Means Vary: alpha level (0.05, 0.01) true difference between Varieties A and B Example Rejection Rates (α = 0.05) 99/100 – True Difference = 12 43/100 – True Difference = 6 13/100 – True Difference = 3 100 t-test statistics when true difference = 12 bushels 100 t-test statistics when true difference = 6 bushels 100 t-test statistics when true difference = 3 bushels 13 out of 100 t-test statistics will reject Ho. 43 out of 100 t-test statistics will reject Ho. 99 out of 100 t-test statistics will reject Ho. * Original Activity Developed by W. Robert Stephenson and Hal Stern. See their article in STATS, Spring 2000, No. 28, 23-27. ** Programming Assistance provided by Mark Bailey, SAS Institute, Inc.


Download ppt "Using JMP Scripts in Introductory Statistics* Amy G. Froelich Iowa State University William M. Duckworth Creighton University Concepts from Introductory."

Similar presentations


Ads by Google