-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathequations.Rmd
110 lines (92 loc) · 3.47 KB
/
equations.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Key equations
### Proportion of taxon $i$: Ratio of taxon $i$ to total.
Actual
\begin{align}
\text{prop}_{i}(s) &= \frac{\text{density}_{i}(s)}{\text{total density}(s)}
\end{align}
Estimator definition
\begin{align}
\hat{\text{prop}}_{i}(s) &= \frac{\text{reads}_{i}(s)}{\text{total reads}(s)}
\end{align}
Estimator error
\begin{align}
\hat{\text{prop}}_{i}(s)
&= \text{prop}_{i}(s) \cdot \frac{\text{efficiency}_{i}}{\text{mean efficiency}(s)}
\end{align}
### Ratio of taxon $i$ to taxon $j$:
actual
\begin{align}
\text{density}_{i/j}(s) = \frac{\text{density}_{i}(s)}{\text{density}_{j}(s)}
\end{align}
estimate
\begin{align}
\hat{\text{density}}_{i/j}(s) = \frac{\text{reads}_{i}(s)}{\text{reads}_{j}(s)} = \frac{\hat{\text{prop}}_{i}(s)}{\hat{\text{prop}}_{j}(s)}
\end{align}
error
\begin{align}
\hat{\text{density}}_{i/j}(s) = \frac{\text{density}_{i}(s)}{\text{density}_{j}(s)} \cdot
\frac{\text{efficiency}_{i}(s)}{\text{efficiency}_{j}(s)}
\end{align}
### Proportion-based density estimate
Estimator
\begin{align}
\hat{\text{density}}_{i}(s)
= \hat{\text{prop}}_{i}(s) \cdot \hat{\text{total density}}(s)
\end{align}
Error in proportion-based density estimate assuming accurate total
\begin{align}
\hat{\text{density}}_{i}(s)
% &= \hat{\text{prop}}_{i}(s) \cdot \text{total density}(s) \\[0.5ex]
% &= \text{prop}_{i}(s) \cdot \frac{\text{efficiency}_{i}}{\text{mean efficiency}(s)} \cdot \text{total density}(s) \\[0.5ex]
&= \text{density}_{i}(s) \cdot \frac{\text{efficiency}_{i}}{\text{mean efficiency}(s)}
\end{align}
Error in proportion-based density estimate
\begin{align}
\hat{\text{density}}_{i}(s)
&= \text{density}_{i}(s) \cdot \frac{\text{efficiency}_{i}}{\text{mean efficiency}(s)} \cdot \text{error in }\hat{\text{total density}}(s)
\end{align}
### Ratio-based density estimate
Estimator
\begin{align}
\hat{\text{density}}_{i}(s)
&= \frac{\text{reads}_{i}(s)}{\text{reads}_{r}(s)} \cdot \hat{\text{density}}_{r}(s)
\end{align}
Error
\begin{align}
\hat{\text{density}}_{i}(s)
&= \text{density}_{i}(s) \cdot \frac{\text{efficiency}_{i}}{\text{efficiency}_{r}} \cdot \text{error in } \hat{\text{density}}_{r}(s)
\end{align}
## Table
<table style="width:100%">
<tr>
<td>Quantity</td>
<td>Actual</td>
<td>Estimate</td>
<td>Error</td>
</tr>
<tr>
<td>Proportion</td>
<td>$\text{prop}_{i}(s) \equiv \frac{\text{density}_{i}(s)}{\text{total density}(s)}$</td>
<td>$\frac{\text{reads}_{i}(s)}{\text{total reads}(s)}$</td>
<td>$\frac{\text{efficiency}_{i}}{\text{mean efficiency}(s)}$</td>
</tr>
<tr>
<td>Ratio</td>
<td>$\text{density}_{i/j}(s) \equiv \frac{\text{density}_{i}(s)}{\text{density}_{j}(s)}$</td>
<td>$\frac{\text{reads}_{i}(s)}{\text{reads}_{j}(s)} = \frac{\hat{\text{prop}}_{i}(s)}{\hat{\text{prop}}_{j}(s)}$</td>
<td>$\frac{\text{efficiency}_{i}(s)}{\text{efficiency}_{j}(s)}$</td>
</tr>
<tr>
<td>Density from proportion</td>
<td>$\text{density}_{i}(s)$</td>
<td>$\hat{\text{prop}}_{i}(s) \cdot \hat{\text{total density}}(s)$</td>
<td>$\frac{\text{efficiency}_{i}}{\text{mean efficiency}(s)} \cdot \text{error in }\hat{\text{total density}}(s)$</td>
<td></td>
</tr>
<tr>
<td>Density from ratio</td>
<td>$\text{density}_{i}(s)$</td>
<td>$\frac{\text{reads}_{i}(s)}{\text{reads}_{r}(s)} \cdot \hat{\text{density}}_{r}(s)$</td>
<td>$\frac{\text{efficiency}_{i}}{\text{efficiency}_{r}} \cdot \text{error in } \hat{\text{density}}_{r}(s)$</td>
</tr>
</table>