NIM : 16/403319/PKU/16137
Minat : KMPK 2016
TUGAS TUTORIAL BIOSTATIKA
LABORATORY 2
A. Creating Table
1. Recall variable wdiff in the previous practical exercise. Describe the distribution of wdiff in
terms of its center, shape, and spread, including any plots you use. Any outliers of this
variable? What does this tell us about how people feel about their current
weight?
a. Central tendency
Membuat variable baru wdiff pada stata: gen wdiff= weight-wtdesire
Membuat distribusi variable wdiff pada stata : sum wdiff, detail
Tabel 1. Weight differences
1%
5%
10%
25%
50%
75%
90%
95%
99%
Percentiles
-25
-10
0
0
Smallest
-500
-311
-110
-91
10
21
40
59.5
100
Largest
235
246
300
300
Mean
: 14,589 pouns
Median
: 10 pounds
Obs
Sum of Wgt.
20000
20000
Mean
Std. Dev.
14.5891
24.04586
Variance
Skewness
Kurtosis
578.2032
1.447632
24.61669
b. Shape
Untuk melihat distribusi normalitas variabel wdiff maka pada stata : hist wdiff, normal
Diperoleh sebagai berikut:
.005
Density
.01
.015
.02
-600
-400
-200
wdiff
200
400
-600
-400
-200
wdiff
200
400
Melihat ada dan tidaknya outliers pada stata dngan perintah : graph box wdiff
Jadi outlier berada pada angka di bawah -31.5 dan di atas 52.5
Jumlah data outlier dapat diketahui dengan perintah pada stata :
count if(wdiff<-31.5|wdiff>52.5)
Hasilnya ada sebanyak 1294 data outlier.
Freq.
Percent
Cum.
unsatisfied
satisfied
14,384
5,616
71.92
28.08
71.92
100.00
Total
20,000
100.00
Berdasarkan tabel distribusi frekuensi di atas dapat dismpulkan bahwa sebagian besar
responden merasa tidak puas dengan berat badan yang saat ini dimiliki yaitu sebesar
71.92 persen dan responden yang merasa puas hanya sebesar 28.08 persen.
2. Using numerical summaries and a side-by-side box plot, determine if men tend to view their
weight differently than women.
Pertama yang dilakukan dengan menggunakan perintah pada stata :
graph box weight, over (gender)
100
200
weight
300
400
500
Gambar 3. Box plot perbedaan laki-laki dan perempuan dalam melihat berat badan mereka
Melihat perbedaan berat badan antara laki-laki dan perempuan menggunakan perintah pada
stata : bysort gender: sum wdiff, detail
-> gender = f
wdiff
1%
5%
10%
25%
Percentiles
-15
0
0
0
50%
75%
90%
95%
99%
Smallest
-83
-80
-61
-50
10
27
48
63
108
Largest
200
220
246
300
Obs
Sum of Wgt.
10431
10431
Mean
Std. Dev.
18.15118
23.99713
Variance
Skewness
Kurtosis
575.8624
2.260822
12.22118
-> gender = m
wdiff
1%
5%
10%
25%
50%
75%
90%
95%
99%
Percentiles
-35
-15
-6
0
Smallest
-500
-311
-110
-91
5
20
35
50
100
Largest
200
210
235
300
Obs
Sum of Wgt.
9569
9569
Mean
Std. Dev.
10.70613
23.49262
Variance
Skewness
Kurtosis
551.9034
.5972216
40.45286
3. Now its time to get creative. Find the mean and standard deviation of weight and determine
what proportions of the weights are within one standard deviation of the mean.
Membuat tabel distribusi frekuensi untuk mengetahui mean dan standart deviasi variabel
berat badan dengan perintah: sum weight, detail
weight
1%
5%
10%
25%
50%
75%
90%
95%
99%
Percentiles
100
115
124
140
Smallest
68
70
78
78
165
190
220
240
290
Largest
400
405
495
500
Obs
Sum of Wgt.
20000
20000
Mean
Std. Dev.
169.683
40.08097
Variance
Skewness
Kurtosis
1606.484
.9556563
4.995356
Mencari mean dan standart deviasi variabel tinggi badan dengan menggunakan perintah
pada stata: sum height, detail
height
Percentiles
59
61
62
64
1%
5%
10%
25%
50%
Smallest
48
48
49
50
67
75%
90%
95%
99%
70
73
74
76
Largest
82
83
84
93
Mean
: 67.1829
Std. Dev
: 4.125954
Obs
Sum of Wgt.
20000
20000
Mean
Std. Dev.
67.1829
4.125954
Variance
Skewness
Kurtosis
17.0235
.1036046
2.62141
.2
Density
.4
.6
-4
-2
0
2
zscore_height
weight
Percentiles
100
115
124
140
1%
5%
10%
25%
50%
Smallest
68
70
78
78
165
75%
90%
95%
99%
Largest
400
405
495
500
190
220
240
290
Obs
Sum of Wgt.
20000
20000
Mean
Std. Dev.
169.683
40.08097
Variance
Skewness
Kurtosis
1606.484
.9556563
4.995356
Membuat variable z-score berat badan dengan perintah: gen zscore_weight =(weight169.68)/40.08
Membuat histogram Z-score berat badan dengan perintah: hist zscore_weight, normal
.1
Density
.2
.3
.4
-2
2
4
zscore_weight
maka nilai batas bawah Q1 dan batas atas Q3 variabel berat badan dan tinggi badan dapat
dihitung.
a. Berat badan:
Q1: 140
Q2: 165
Q3: 190
IQR: Q3-Q1 = 190-140 = 50
Batas bawah: Q1-1.5*IQR= 140-1.5*50=65
Batas atas: Q3+1.5*IQR= 190+1.5*50=265
Menentukan jumlah outlier variabel berat badan dengan perintah:
count if (weight<65|weight>265)
Jumlah outlier: 441
Nilai ekstrim Q3+3*IQR: 190+3*50=340
b. Tinggi badan:
Q1: 64
Q2: 67
Q3: 70
IQR: Q3-Q1 = 70-64=6
Batas bawah: Q1-1.5*IQR= 64-1.5*6=55
Batas atas: Q3+1.5*IQR= 70+1.5*6=79
Menentukan jumlah outlier variabel tinggi badan dengan perintah:
count if (height<55|height>79)
Jumlah outlier: 36
Nilai ekstrim Q3+3*IQR= 70+3*6=88
Berdasarkan perhitungan di atas, maka grafik berat badan dan tinggi badan dengan
menghilangkan nilai outlier, dapat dibuat scatter dengan perintah sebagai
berikut:scatter height weight if (height<88 & weight<340)
90
80
Height in inches
70
60
50
0
100
200
Weight in pounds
300
400
Gambar 6. Grafik berat badan dan tinggi badan setelah outlier dihilangkan
B. Creating Table
1. Read following article by Annesley, T. M.with entitled Bring Your Best to the Table. Clin. Chem.,
56(10), 1528-1534, 2010. Please create a scientific table using data presented in Figure 1 from this
article. Your table should be submitted on the words file and it must use a format similar to table 2 in
this article.
Serum antiproxin and interleukin-6 in patiens with congestif heart failure
Classification
Healthy (n=266)
Asymptomatic heart failure
Symptomatic heart failure (n=295)
266
318
295
Antiproxin
Concentration
ng/L
99 (66-174)
216 (147-296)
556 (248-791)
pa
0.034
<0.00
1
Interleukin-6
Concentration ng/L
pb
662 (326-948)
841 (448-1227)
1269 (825-1572)
0.152
0.029
2. Look at Table 9 in Annesleys article. This table can be improved in several ways to make it more
clear and informative. Please retype and modify this table. Compare your suggested changes with
those provided at the end of this article.
Table 9. Effect of tacrolimus or sirolimus on everolimus measurement
Specimen (blood)
Measured
Bias %)
concentration
9.9 /L
10.5 /L
14.3 /L
-1
5
43
0.052
<0.001