Bài tập 11. Kết qủa sau đây là số đo của 20 quan sát về
thời gian trang điểm của phụ nữ: 34 24 10 16 52 76 33 31 46 24 18 26 57 32 25 48 22 48 29 19
a. Xác định giá trị trung bình và các giá trị phần tư
b. Xác định giá trị interquartile range.
c. Xây dựng đồ thị (modified) boxplot của dữ liệu
d. Vẽ biểu đồ histogram
Bài tập 2 The carbon monoxide in cigarettes is thought to be hazardous to the
fetus of a pregnant woman who smokes. In a study of this theory, blood drawn from pregnant women before and after smoking a cigarette. Measurements were made of the percent of blood hemoglobin bound to carbon monoxide as carboxyhemoglobin (COHb). The results for ten women are shown the table.
Blood COHb (%) Subject Before After Increase 1 1.2 7.6 6.4 2 1.4 4.0 2.6 3 1.5 5.0 3.5 4 2.4 6.3 3.9 5 3.6 5.8 2.2 6 0.5 6.0 5.5 7 2.0 6.4 4.4 8 1.5 5.0 3.5 9 1.0 4.2 3.2 10 1.7 5.2 3.5
a. Calculate the mean and standard deviation of the INCREASE in COHb.
b. b. Calculate the mean COHb before and the mean after. Is the mean increase equal to the increase in means?
c. c. Construct a stem-and-leaf diagram of the increase in COHb.
d. Use the diagram to determine the median increase.
igf.txt data: ANOVA• Số liệu
– Tên dataset: igf.txt– Tên các biến: id, age, sex, weight, height, ethnicity, igfi, igfbp3, als, pinp, ictp, p3np
• Vấn đề:– Có sự khác biệt gì về igfi, igfbp3, als, pinp và p3np giữa các nhóm sắc tộc (ethnicities) hay không.
• Việc làm:
– Đọc igf.txt vào R
– Tiến hành phân tích mô tả cho từng sex và từng ethnicity bằng biểu đồ
– Phân tích phương sai (ANOVA) để giải quyết vấn đề
Histogram of age
age
Fre
quen
cy
15 20 25 30
05
1015
20
Histogram of weight
w eight
Fre
quen
cy
40 45 50 55 60
05
1015
Histogram of height
height
Fre
quen
cy
150 170 190
05
1020
30
Histogram of igfi
igf i
Fre
quen
cy
100 200 300 400
010
2030
40
Histogram of igfbp3
igfbp3
Fre
quen
cy
2.0 3.0 4.0 5.0
010
2030
40
Histogram of als
als
Fre
quen
cy
150 250 350 450
010
2030
Histogram of pinp
pinp
Fre
quen
cy
0 200 400 600 800
010
2030
4050
Histogram of ictp
ictpF
requ
ency
5 10 15 20
010
2030
Histogram of p3np
p3np
Fre
quen
cy
5 10 15
010
2030
40
Histogram of log.igfi
log.igfi
Fre
quen
cy
4.5 5.0 5.5 6.0
05
1525
35
Histogram of log.pinp
log.pinp
Fre
quen
cy
3 4 5 6 7
05
1525
35
Histogram of log.ictp
log.ictp
Fre
quen
cy
1.0 1.5 2.0 2.5 3.0
05
1015
20
Histogram of log.p3np
log.p3np
Fre
quen
cy
1.0 1.5 2.0 2.5
05
1015
2025
Histogram of weight
weight
Fre
qu
en
cy
40 45 50 55 60
05
10
15
Hình 1.1. Đồ thị Histogram của cân nặng
Cân nặng
Tần số
40 45 50 55 60
05
10
15
Female Male
1520
2530
Age by sex
Female Male
4550
5560
Wt by sex
Female Male
150
170
190
Ht by sex
Female Male
100
200
300
400
IGFI by sex
Female Male
2.0
3.0
4.0
5.0
IGFBP3 by sex
Female Male
200
300
400
ALS by sex
Female Male
020
040
060
0PINP by sex
Female Male
510
1520
ICTP by sex
Female Male
24
68
1216
P3NP by sex
Female Male
4.5
5.0
5.5
6.0
LogIGFI by sex
Female Male
3.5
4.5
5.5
6.5
LogPINP by sex
Female Male
1.0
1.5
2.0
2.5
3.0
LogICTP by sex
Female Male
1.0
1.5
2.0
2.5
LogpNP by sex
insulin.txt: multiple regression analysis• Số liệu:
– Tên dataset: insulin.txt– Tên các biến: id sex age bmi abd subsca supra triceps hc wc hdl ldl tc tg diast syst insulin glucose ir logir
• Vấn đề: Yếu tố nào có liên quan đến ir hay logir
• Việc làm:– Đọc insulin.txt vào R– Phân tích mô tả về mối liên hệ giữa các biến số– Phân tích hồi qui tuyến tính đa biến (multiple linear
regression) và BMA để tìm các yếu tố liên quan.
cafe.csv: ANOVA• Số liệu:
– Tên dataset: cafe.csv– Tên các biến: subject product session burnt caramel smoky earthy cigarette chocolate rottenwood woody butter vanille milky intensity
• Vấn đề: Khác biệt về intensity giữa các loại cà phê (product)
• Việc làm:– Đọc cafe.csv vào R– Phân tích mô tả về mối liên hệ giữa các biến số– Phân tích ANOVA.
rmr
• https://docs.google.com/document/d/10Tb7O0rml472maACVWBTMtdRCUYvuw6Zmqzo3BRhOno/edit?hl=en_GB&authkey=CKP3veEK