Example 1
Example 1
Example 1
X = {3.3 8.4 3.1 3.2}
Y = {2.1 9.5 3.1 3.8}
1. Calculation of mean between replicated experiments for each spot:
z1 = 0.5 × (x1 + y1 ) = 0.5 × (3.3 + 2.1) = 2.7
⇒ Z = {2.70 3.10 3.50 8.95}
2. Calculate Q1 , Q2 , Q3 with different methods
3. Calculate IQR, Q1 − 1.5 × IQR, Q3 + 1.5 × IQR with different methods
4. Draw Boxplots
5. Calculate mean and median for each method and calculate fold changes
Example 1
Method A (default):
Qp =
x(k )
1
(x(k) + x(k +1) )
2
: n × p is not an integer (k = int(n × p) + 1)
:
n × p is an integer (k = n × p)
1
(x(1) + x(2) ) = 0.5 × (2.70 + 3.10) = 2.900
2
1
n = 4; p = 0.50; n × p = 2 ⇒ Q2 = (x(2) + x(3) ) = 0.5 × (3.10 + 3.50) = 3.300
2
1
n = 4; p = 0.75; n × p = 3 ⇒ Q3 = (x(3) + x(4) ) = 0.5 × (3.50 + 8.95) = 6.225
2
n = 4; p = 0.25; n × p = 1 ⇒ Q1 =
IQR = Q3 − Q1 = 6.225 − 2.900 = 3.325
Q3 + 1.5 × IQR = 6.225 + 1.5 × 3.325 = 11.21
Q1 − 1.5 × IQR = 2.900 − 1.5 × 3.325 = −2.09
Example 1
Method B (Excel):
Qp = (1 − j) × x(k +1) + j × x(k +2) : k =int((n − 1) × p); j = (n − 1) × p − k
n = 4; p = 0.25; k =int(3 × 0.25) = 0; j = 3 × 0.25 = 0.75
Q1 = 0.25 × 2.7 + 0.75 × 3.1 = 3.00
n = 4; p = 0.50; k =int(3 × 0.50) = 1; j = 3 × 0.50 − 1 = 0.50
Q2 = 0.50 × 3.1 + 0.50 × 3.5 = 3.30
n = 4; p = 0.70; k =int(3 × 0.75) = 2; j = 3 × 0.75 − 2 = 0.25
Q3 = 0.75 × 3.5 + 0.25 × 8.95 = 4.8625
IQR = Q3 − Q1 = 4.8625 − 3.0 = 1.8625
Q3 + 1.5 × IQR = 4.8625 + 1.5 × 1.8625 = 7.66
Q1 − 1.5 × IQR = 3.0 − 1.5 × 1.8625 = −0.21
Example 1
Example 1
Method A:
Median=3.30 ⇒ foldchange=9.85
Mean=4.57 ⇒ foldchange=23.75
Method B (exclude outlier 8.95):
Median=3.10 ⇒ foldchange=8.57
Mean=3.10 ⇒ foldchange=8.57
Example 2
Example 2
Example 2
Example 3
SN = 100%; SP = 75%
color blind
no sense of color
knows color
total
not color blind
total
500
125
635
0
375
375
500
500
1000
Of the kids who have no sense of color 500/625=0.8 are color blind.
So there is an chance of 80% that this kid is color blind
Example 3
Given:
CB ... color blind, NCB ... not color blind, SC ... knows color, NSC ... no sense of color
p(CB) = 0.5
p(NCB) = 0.5
p(SC|NCB) = 0.75 ⇒ p(NSC|NCB) = 0.25
p(NSC|CB) = 1
Bayes theorem:
p(CB|NSC) =
p(CB|NSC) =
p(NSC|CB) × p(CB)
p(NSC|CB) × p(CB) + p(NSC|NCB) × p(NCB)
1 × 0.5
1 × 0.5 + 0.25 × 0.5
=
0.5
0.5 + 0.25 × 0.5
= 0.8
© Copyright 2026 Paperzz