diff --git a/analysis.tex b/analysis.tex index 0b87631..36485d0 100644 --- a/analysis.tex +++ b/analysis.tex @@ -115,14 +115,18 @@ By \eqref{eq:variance} we have then \sd &< 2^N\big(\sqrt{\frac{2\prob^2}{\sketchCols}}\big)\\ \sdRel& < \sqrt{\frac{2}{\sketchCols}}. \end{align*} -Since the sketch has multiple trials, a probability of exceeding error bound smaller than one half guarantees an estimate that is less than or equal to the error bound when taking the median of all trials. Expressing this as Chebyshev's Inequality yields +Since the sketch has multiple trials, a probability of exceeding error bound smaller than one half guarantees an estimate that is less than or equal to the error bound when taking the median of all trials. Expressing this in Chebyshev's Inequality yields \begin{equation*} \cheby. \end{equation*} Substituting $\mu\epsilon$ for $k\sd$ and solving for $\sketchCols$ results in \begin{align*} - \chebyK\Rightarrow& \\ -&\sketchCols = \frac{6}{\mu^2\epsilon^2} +&k\sdRelVar = \mu\epsilon\\ +&k = \frac{\mu\epsilon}{\sdRelVar}\\ +&k = \frac{\mu\epsilon\sqrt{\sketchCols}}{\sqrt{2}}\\ +&k^2 = \frac{1}{\big(\frac{\mu\epsilon\sqrt{\sketchCols}}{\sqrt{2}}\big)^2}\\ +&k^2 = \frac{2}{\big(\mu^2\epsilon^2\sketchCols}\\ +&\chebyK\Rightarrow \sketchCols = \frac{6}{\mu^2\epsilon^2} \end{align*} diff --git a/macros.tex b/macros.tex index ed39bef..6e7ec3f 100644 --- a/macros.tex +++ b/macros.tex @@ -61,6 +61,7 @@ \newcommand{\varParam}[1]{Var\bigParamBox{#1}} \newcommand{\varSym}{\sd^2} \newcommand{\sd}{\sigma} +\newcommand{\sdRelVar}{\sqrt{frac{2}{\sketchCols}}} \newcommand{\sdRel}{\sd_{rel}} %%%%%%%%%%%%%%%%% %Chebyshev