Incorporating Statistical Software Into the Classroom Demonstration of R Kelly Fitzpatrick, CFA Assistant Professor of Mathematics County College of Morris.

Slides:



Advertisements
Similar presentations
Four girls soccer teams took a random sample of players regarding the number of goals scored per game. The results are below. Use a significance level.
Advertisements

Two Population Means Hypothesis Testing and Confidence Intervals For Differences in Proportions.
Topics Today: Case I: t-test single mean: Does a particular sample belong to a hypothesized population? Thursday: Case II: t-test independent means: Are.
10-3 Inferences.
Inference for Regression
Choosing Significance Level Section Starter At the local bakery, loaves of bread are supposed to weigh 1 pound, with standard deviation 0.13.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
Hypothesis testing Week 10 Lecture 2.
Lecture 3 Miscellaneous details about hypothesis testing Type II error
Fall 2006 – Fundamentals of Business Statistics 1 Chapter 8 Introduction to Hypothesis Testing.
The Scientific Study of Politics (POL 51) Professor B. Jones University of California, Davis.
8-4 Testing a Claim About a Mean
WARM – UP 1. What is the Critical Value t* for a distribution of 26 observation with probability 0.10 to the Right? 2. What is the Critical Value t* for.
Part IV – Hypothesis Testing Chapter 4 Statistics for Managers Using Microsoft Excel, 7e © 2014 Pearson Prentice-Hall, Inc. Philip A. Vaccaro, PhD MGMT.
Educational Research by John W. Creswell. Copyright © 2002 by Pearson Education. All rights reserved. Slide 1 Chapter 8 Analyzing and Interpreting Quantitative.
1 Confidence Interval for Population Mean The case when the population standard deviation is unknown (the more common case).
Lab 5 Hypothesis testing and Confidence Interval.
Hypothesis Testing with Two Samples
Confidence Intervals and Hypothesis Testing - II
Fundamentals of Hypothesis Testing: One-Sample Tests
Claims about a Population Mean when σ is Known Objective: test a claim.
Hypothesis Testing (Statistical Significance). Hypothesis Testing Goal: Make statement(s) regarding unknown population parameter values based on sample.
Means Tests Hypothesis Testing Assumptions Testing (Normality)
Comparing Means From Two Sets of Data
Quantitative Research in Education Sohee Kang Ph.D., lecturer Math and Statistics Learning Centre.
Section 10.1 ~ t Distribution for Inferences about a Mean Introduction to Probability and Statistics Ms. Young.
Chapter 24 Comparing Means.
Dependent Samples: Hypothesis Test For Hypothesis tests for dependent samples, we 1.list the pairs of data in 2 columns (or rows), 2.take the difference.
Introduction to Statistical Inference Probability & Statistics April 2014.
Two Sample Tests Nutan S. Mishra Department of Mathematics and Statistics University of South Alabama.
Statistics: Unlocking the Power of Data Lock 5 Afternoon Session Using Lock5 Statistics: Unlocking the Power of Data Patti Frazer Lock University of Kentucky.
Chapter 9 Hypothesis Testing and Estimation for Two Population Parameters.
Hypothesis Testing with One Sample Chapter 7. § 7.1 Introduction to Hypothesis Testing.
Chapter 10 Hypothesis Testing
PowerPoint presentations prepared by Lloyd Jaisingh, Morehead State University Statistical Inference: Hypotheses testing for single and two populations.
Section 9.2 Testing the Mean  9.2 / 1. Testing the Mean  When  is Known Let x be the appropriate random variable. Obtain a simple random sample (of.
Student’s t-distributions. Student’s t-Model: Family of distributions similar to the Normal model but changes based on degrees-of- freedom. Degrees-of-freedom.
● Final exam Wednesday, 6/10, 11:30-2:30. ● Bring your own blue books ● Closed book. Calculators and 2-page cheat sheet allowed. No cell phone/computer.
Chapter 12 Tests of a Single Mean When σ is Unknown.
Large sample CI for μ Small sample CI for μ Large sample CI for p
Objectives (BPS chapter 19) Comparing two population means  Two-sample t procedures  Examples of two-sample t procedures  Using technology  Robustness.
S-012 Testing statistical hypotheses The CI approach The NHST approach.
1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known 
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
Chap 8-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 8 Introduction to Hypothesis.
Lecture 9 Chap 9-1 Chapter 2b Fundamentals of Hypothesis Testing: One-Sample Tests.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Illustrations using R B. Jones Dept. of Political Science UC-Davis.
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Basic Business Statistics.
Analyzing financial data in an Introductory Statistics Course Kelly Fitzpatrick, CFA Assistant Professor of Mathematics County College of Morris
A course is designed to increase mathematical comprehension. In order to evaluate the effectiveness of the course, students are given a test before and.
Hypothesis Testing Errors. Hypothesis Testing Suppose we believe the average systolic blood pressure of healthy adults is normally distributed with mean.
- We have samples for each of two conditions. We provide an answer for “Are the two sample means significantly different from each other, or could both.
Applied Quantitative Analysis and Practices LECTURE#14 By Dr. Osman Sadiq Paracha.
Understanding Basic Statistics Fourth Edition By Brase and Brase Prepared by: Lynn Smith Gloucester County College Chapter Nine Hypothesis Testing.
Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Assumptions 1) Sample is large (n > 30) a) Central limit theorem applies b) Can.
Lecture Slides Elementary Statistics Twelfth Edition
T tests comparing two means t tests comparing two means.
Introduction to Basic Statistical Methods Part 1: Statistics in a Nutshell UWHC Scholarly Forum May 21, 2014 Ismor Fischer, Ph.D. UW Dept of Statistics.
Hypothesis Testing Steps for the Rejection Region Method State H 1 and State H 0 State the Test Statistic and its sampling distribution (normal or t) Determine.
Copyright© 1998, Triola, Elementary Statistics by Addison Wesley Longman 1 Testing a Claim about a Mean: Large Samples Section 7-3 M A R I O F. T R I O.
Hypothesis Testing. Suppose we believe the average systolic blood pressure of healthy adults is normally distributed with mean μ = 120 and variance σ.
If we fail to reject the null when the null is false what type of error was made? Type II.
Dominate versus Non-Dominate Hand Rochelle Mills and Courtney Preister.
Example 1 We wanted to know if the American League or National League had better pitching – many people believe the NL has stronger pitching (which means.
Inference about a Population Mean
Stat 251 (2009, Summer) Final Lab TA: Yu, Chi Wai.
Chapter 9: Hypothesis Testing
Power Section 9.7.
Presentation transcript:

Incorporating Statistical Software Into the Classroom Demonstration of R Kelly Fitzpatrick, CFA Assistant Professor of Mathematics County College of Morris

Global Objective “The ability to take data- to be able to understand it, to process it, to extract it, to visualize it, to communicate it- that’s going to be a hugely important skill in the next decades, not only at the professional level but even at the education level for elementary school kids, for high school kids, for college kids. Because now we really do have essentially free and ubiquitous data. So the complimentary scarce factor is the ability to understand that data and extract value for it.” Hal Varian, professor at University of California at Berkeley and Chief Economist for Google

Mathematics Department Objective The Department of Mathematics at the County College of Morris will fully integrate the use of statistical software into their statistics courses by Fall The use of statistical software will enhance the education of our students and prepare them for both the professional world and/or their future educational goals.

Thomas Edison believed the motion picture would change education in the traditional classroom setting and eliminate the need for books. (1913) Will our students learn more? Will Technology Change the Classroom?

You can control large data sets with one identifier You have control over formatting and design Open source code Bring numbers/concepts to life for your students Computer programming is a desired skill 5 Reasons to use R

3 Fiscal Reasons to use R FREE for the Students FREE for the Professors FREE for the College

Why Corporations use R R has less reporting requirements to the FDA Analysis is reproducible Analysis is faster

Resources for Training Book: Data Analysis and Graphics using R- An Example-Based Approach Authors: John Maindonald and John Braun Hosted by: John Hopkins University R has build in tutorials

{3,10, 24, 29, 33} Pick 5 numbers between 1 to 100

Your students will pick their: Birthday (kids, parents, loved ones) Age (kids, parents, loved ones) Lucky Numbers Sports Players Number/ Sports Records Phone Number, House or Address Numbers R Code Random Number Generation choose(100,5) SRS<-sort(sample(1:100,5,replace=FALSE)) library(gtools) outcomes<-combinations(n=20,r=5,v=1:20,repeats=TRUE)

Sports Statistics Baseball statistics correlation analysis- Output from R R Code: data <- read.csv(“C:/file path.csv") BaseballCorrMatrix<-cor(data[2:8]) write.csv(BaseballCorrMatrix, file =“C:/path.csv”)

Graphs in R Snowfall in New York City- Stem and Leaf Plots 0 | | | | 5 4 | | | 2 7 | 6 R Code: title=“Snowfall in NY City 1990 to 2013” data=c(25,13,25,53,12,76,10,6,13,16,35,4,49,43,41,40,12,12,28,51,62,7,26,57) stem(data,scale=2)

Graphs in R Code: par(mfrow=c(2,2)) hist(data,breaks=10) hist(data,breaks=10,prob=TRUE) boxplot(data, horizontal=TRUE,main=title) stripchart(data, method = "stack",pch=19, offset = 1, frame.plot = FALSE, at =.05)

Normality Plots in R Snowfall in New York City R code: qqnorm(data, datax=TRUE)

NS<-qnorm(ppoints(length(data))) correl<-round(cor(sort(data),NS),digits=4) plot(sort(data),NS, main=title,xlab="data", ylab="Normal Scores") text(min(data),1,correl, adj = 0,cex=2) text(min(data),1.5,round(shapiro.test(data)$p.value,5),adj=0, cex=2 ) text(min(data),2,length(data), adj = 0, cex= 2) Customized Normality Plot in R H o = Data is ND Ha = Data is not ND α =.10 α =.05 α = Not NDYes ND Critical Value Test: If R calculated > cv data is ND Shapiro Test: If the p-value < α, the data is not ND

Looking at Normality Plots for different time periods Not ND at α =.10,.05 or.01 Yes ND at α =.10,.05 or.01 Not ND at α =.10,.05,.01

Looking at Boxplots for different time periods

Hypothesis Testing in R Determine at a 5% significance level if the average snowfall from 1990 to 2013 is different then the historical average ( ) of 28 inches a year. R Code for Student’s T-test: t.test(data, alternative = c("two.sided"), mu = 28, conf.level = 0.95) One Sample t-test t = , df = 23, p-value = alternative hypothesis: true mean is not equal to percent confidence interval: sample estimates: mean of x If the p-value.05 Do Not Reject the Null Conclude: The average yearly snowfall from 1990 to 2013 is not different from the historical mean.

n= 100Classical/TheoreticalTheoreticalSimulatedEmpirical/Simulation P(E)ProbabilityFrequency Probability P(0) P(1) P(2) P(3)