Exercise 1 on correlation
In a study one compared two instruments for measuring the peak expiratory flow. For a sample of 8 person, one measurement was taken with a high quality instrument (called "pef" below) and one measurement was taken with a cheaper instrument that people with asthma may have at home (called "minipef" below).
The results are given in the table (in liter per minute)
Person |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
pef |
494 |
395 |
516 |
434 |
476 |
413 |
442 |
433 |
minipef |
512 |
430 |
520 |
428 |
500 |
364 |
380 |
445 |
a) Read the data into R and make a plot of the data. What can you see from the plot? (See the introduction to R or ask the instructors if you do not remember how to read the data into R and/or make a scatter plot of them.)
b) Compute the correlation between "minipef" and "pef". (See slide 11 from the lectures for R help.)
?????????????????????????????????????????????????????????????????????????????????????????????????????????????
c) Find a 95% confidence interval for the correlation. (See slide 13 from the lectures for R help.)
d) A person uses the cheaper instrument to measure the peak expiratory flow and records the value 475 l/min. What is your prediction of his/her value measured with the high quality instrument? (See slide 18 from the lectures for R help.)