Section A, Question 3
Use the qt command to calculate the 90th, 95th, 97.5th, 99th and 99.5th
percentiles of Students t distributions with 1, 2, , 9 and 10 degrees of
freedom respectively. The results should be output in a table, with rows
corresponding to the degrees of freedom and columns corresponding to
the percentiles. The results should be clearly labelled, and given to three
decimal places.
Section B, Question 2
The data file ceramic.dat contains data on the strength of ceramic material
produced in different laboratories
under different conditions. For selected sets of conditions, each lab
produced two batches of material. There are 7 columns of data, of which
two are used in this question: Batch (in the third column) is the batch
number (1 or 2) and Y is a measure of ceramic strength.
1. 2.
3. 4.
Read the data into R.
Without using the built-in ecdf function (or anything similar!), obtain
and plot the empirical cumulative distribution function (ecdf) for the
two batches (see Rice, second edition, p. 346). The plot should
contain the ecdf for both lines on the same plot, which should be
plotted using two different line styles and colours.
Add a legend in an appropriate place with correct labelling.
Place reference lines on the graph indicating the median value for
each group.
Your code should automatically save the plot to a PDF file that is 6 inches
wide by 4 inches high.
Section C, Question 2
The data file vitaminc.dat contains data on blood plasma concentrations (in mg/DL) for two groups of patients: one group are diagnosed schizophrenics
and the others are controls. There are three columns in the file: Schiz
codes for patient group (1 = control, 2 = schizophrenic), Plasma0 is an
initial measurement of blood plasma, and Plasma2 is a second
measurement, made 2 hours later after the subjects had been given 1g
ascorbic acid dissolved in water.
1.
2.
3. 4.
Graphically, compare the two groups of patients at each time point.
Also, compare the differences in plasma concentration between the
two times. If you require more than one plot for these comparisons,
all plots should appear on the same page.
Use the most appropriate t tests to assess the strength of evidence
for differences between the two groups as regards (i) plasma
concentrations at each time point (ii) the change in plasma
concentration between time points.
Repeat the analysis of part (2) using nonparametric methods.
Briefly, summarise your findings.
Your code should automatically save the plot(s) for part (1) to a PDF file
that is 6 inches wide by 8 inches high.
Reviews
There are no reviews yet.