An archive the questions from Mark's Summer 2018 Stat 185.

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 tuition.

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

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

read.csv(text = 'paste-your-data-here')
jthomps6

Here is the data for a 95% confidence interval of the twelve colleges.

For this one, instead of using the read.csv to read the text I decided to put it into excel instead and have it called “collegetuition”.

Code

tuition = collegetuition #reading from excel file
t.test(x=tuition$Resident, y=tuition$Nonresident)

Output

        Welch Two Sample t-test

data:  tuition$Resident and tuition$Nonresident
t = -5.9329, df = 14.57, p-value = 3.098e-05
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval: -4681.291 -2202.042
sample estimates: mean of x mean of y 
        2950.000  6391.667
jgilfill

To read code, I entered the following:

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”)