We are asked to compare the mean heights of individuals of Italian nationality and German nationality. The population variances for the Italian and German Nationalities are known to be 5 and 8.5, respectively. Here is the data:

Italian: 175, 168, 168, 190, 156, 181, 182, 175, 174, 179

German: 185, 169, 173, 173, 188, 186, 175, 174, 179, 180

We will test the hypothesis that the true mean heights for these groups are different and construct a confidence interval for the difference between mean heights.

Since the data set is small we will enter the data directly to R without using a data frame.

Twenty four batches of donuts were prepared and six radomly assigned to each of the four fats. The amount of fat absorbed for each batch (in grams) were measured. Upload and load the data into RStudio. Here is the data

Fat1

Fat2

Fat3

Fat4

164

178

175

155

172

191

193

166

168

197

178

149

177

182

171

164

156

185

163

170

195

177

176

168

Note that the data is not in the format to be used in R so we will stack the data.

Suppose that 60% of citizens in Minnesota voted in last election. 85 out of 148 people on the telephone survey said that they voted in currect election. Is there an evidence that the proportion of voters in the population is less than last election? We woud like to construct a 99% confidence interval for the true proportion of voters in the current election.

Based on the research published by Robert Rutledge, MD, and his colleaques in the Annals of Surgery (1993), in car accidents in1916 cases the patients did not use the seat belt and 135 of them died. On the other hand, in 1490 cases the patient use the seat belts and 47 of them died. Test the hypothesis that the proportion of the cases ended up with dead is the same for the no seat belt and seat belt groups.

The table gives you offspring being left-handed and parental handedness. For the parental handedness fir one is for father the second one is for mother. Click on the file to download it and move it into RStudio.

STEP 1. Create a data file outside of R by using Excel just like given above. Note that you give a variable name for the row categorical variable. In this example it is "Father.Mother". Download and load the file to RStudio. In this case this has been already done.

EXERCISE: The following tables are from a study on Eye-Dominance, Writing Hand, and Throwing Hand relationships. To see the original paper click here. If you would like to determine your dominant eye visit this site.

Analyze the tables by using the technique that you have learned in this section.

Eye-
Dominance

Writing Hand

Right

Left

Right

544

56

Left

251

83

Throwing Hand

Writing Hand

Right

Left

Right

544

56

Left

251

83

Eye-Dominance

Throwing Hand

Right

Left

Right

544

56

Left

251

83

Type of Data: Two Quantitative (Numerical)

GENERAL FORM OF R COMMAND:

lm(ResponseVariable ~ ExplanatoryVariable, data=dataframename)

EXAMPLE:

Dataset: faithful

There are two observation variables in the data set. The first one, called eruptions, is the duration of the geyser eruptions. The second one, called waiting, is the length of waiting period until the next eruption. We will carry out simple regression analysis of the waiting intervals (response) on the eruption durations (explanatory)