An archive of Mark's Fall 2017 Intro Stat course.

Paired college tuition data

mark

The CSV file below indicates resident tuition vs non-resident tuition for 12 public colleges. Use that data to create a 95% confidence interval for the paired differences between residential tuition and non-residential tutition.

Institution,Resident,Nonresident
College_1,4300,8700
College_2,1900,3600
College_3,3300,8500
College_4,3300,7000
College_5,2700,5700
College_6,3400,5900
College_7,2900,3400
College_8,2300,4500
College_9,3500,7400
College_10,3200,5900
College_11,1500,8300
College_12,3100,7800

Recall that you can read that kind of data into an R dataframe using a command like so:

read.csv(text = 'paste-your-data-here')
mark
mark
TineriTalentati
df=read.csv(text = "Institution,Resident,Nonresident
College_1,4300,8700
College_2,1900,3600
College_3,3300,8500
College_4,3300,7000
College_5,2700,5700
College_6,3400,5900
College_7,2900,3400
College_8,2300,4500
College_9,3500,7400
College_10,3200,5900
College_11,1500,8300
College_12,3100,7800")
t.test(df$Nonresident-df$Resident)

One Sample t-test

data:  df$Nonresident - df$Resident
t = 6.9891, df = 11, p-value = 2.302e-05
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
2357.821 4525.512
sample estimates:
mean of x 
3441.667 

The 95% confidence interval is as shown:
[2357.82, 4525.51]

asiarenee5
read.csv(text = "Institution,Resident,Nonresident
College_1,4300,8700
College_2,1900,3600
College_3,3300,8500
College_4,3300,7000
College_5,2700,5700
College_6,3400,5900
College_7,2900,3400
College_8,2300,4500
College_9,3500,7400
College_10,3200,5900
College_11,1500,8300
College_12,3100,7800")
t.test( df$Nonresident- df$Resident)      


One Sample t-test

data:  df$Nonresident - df$Resident
t = 6.9891, df = 11, p-value = 2.302e-05
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
2357.821 4525.512
sample estimates:
 mean of x 
 3441.667

[2357.821 4525.512] is the 95% confidence interval

Elena
> read.csv=(text="Institution,Resident,Nonresident
+ College_1,4300,8700
+ College_2,1900,3600
+ College_3,3300,8500
+ College_4,3300,7000
+ College_5,2700,5700
+ College_6,3400,5900
+ College_7,2900,3400
+ College_8,2300,4500
+ College_9,3500,7400
+ College_10,3200,5900
+ College_11,1500,8300
+ College_12,3100,7800")

> t.test(df$Nonresident-df$Resident)

    One Sample t-test

data:  df$Nonresident - df$Resident
t = 7.221, df = 11, p-value = 1.706e-05
alternative hypothesis: true mean is not equal to 0 
95 percent confidence interval:
 2421.596 4545.071
sample estimates:
mean of x 
3483.333 

the 95% confidence Interval is [2421.596, 4545.071]

mxcecilia

[quote=“asiarenee5, post:5, topic:149, full:true”]
read.csv(text = “Institution,Resident,Nonresident
College_1,4300,8700
College_2,1900,3600
College_3,3300,8500
College_4,3300,7000
College_5,2700,5700
College_6,3400,5900
College_7,2900,3400
College_8,2300,4500
College_9,3500,7400
College_10,3200,5900
College_11,1500,8300
College_12,3100,7800”)
t.test( df Nonresident- df Resident)













One Sample t-test

data: df Nonresident - df Resident
t = 6.9891, df = 11, p-value = 2.302e-05
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
2357.821 4525.512
sample estimates:
mean of x
3441.667






95% confidence interval: [2357.821 4525.512]

Erad
df = read.csv(text = "Institution,Resident,Nonresident
College_1,4300
College_2,1900,3600
College_3,3300,8500
College_4,3300,7000
College_5,2700,5700
College_6,3400,5900
College_7,2900,3400
College_8,2300,4500
College_9,3500,7400
College_10,3200,5900
College_11,1500,8300
College_12,3100,7800")
t.test(df$Nonresident-df$Resident)

    One Sample t-test

data:  df$Nonresident - df$Resident
t = 6.9891, df = 11, p-value = 2.302e-05
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
2357.821 4525.512
sample estimates:
mean of x 
 3441.667

The 95% confidence interval is (2357.82, 4525.51)

amandanail
read.csv(text = "Institution,Resident,Nonresident
College_1,4300,8700
College_2,1900,3600
College_3,3300,8500
College_4,3300,7000
College_5,2700,5700
College_6,3400,5900
College_7,2900,3400
College_8,2300,4500
College_9,3500,7400
College_10,3200,5900
College_11,1500,8300
College_12,3100,7800")
t.test( df$Nonresident- df$Resident)      


One Sample t-test

data:  df$Nonresident - df$Resident
t = 6.9891, df = 11, p-value = 2.302e-05
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
2357.821 4525.512
sample estimates:
 mean of x 
 3441.667
The 95% confidence interval is (2357.82, 4525.51)
shiller
df=read.csv(text="Institution,Resident,Nonresident
College_1,4300,8700
College_2,1900,3600
College_3,3300,8500
College_4,3300,7000
College_5,2700,5700
College_6,3400,5900
College_7,2900,3400
College_8,2300,4500
College_9,3500,7400
College_10,3200,5900
College_11,1500,8300
College_12,3100,7800")
t.test(df$Nonresident-df$Resident)

    One Sample t-test

data:  df$Nonresident - df$Resident
t = 6.9891, df = 11, p-value = 2.302e-05
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
2357.821 4525.512
sample estimates:
mean of x 
 3441.667

The 95% confidence interval is (2357.821, 4525.512). Poor nonresident students :frowning: