ctb / 2022-sourmash-sens-spec

Playing around with sens/spec measurements for simulated stuff
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

some math equations ;) #8

Open ctb opened 1 year ago

ctb commented 1 year ago

$P$(observe k events) =

Screen Shot 2022-12-12 at 9 14 29 AM

Here the parameter $\lambda = \frac{M}{S}$ is the expected number of hashes for $M$ k-mers at a scaled of $S$.

$P$(k hashes for M k-mers with scaled S) = ${\exp(-M / S) \over k! } ({M \over S })^k $

$P$(empty sketch for M k-mers => $k=0$) = $e^{-M / S}$

ctb commented 1 year ago

For any regions $R_A$ and $R_B$ with identical FracMinHash sketches at scaled $S$, the probability that the differential containment is smaller than a fraction $f$ of $R_A$ is:

$P({| R_A - R_B | \over |R_A|} < f) = \exp(- {f | R_A | \over S })$