Minor corrections
This commit is contained in:
parent
584658c281
commit
e4676fedc8
|
@ -79,10 +79,11 @@ Note that with an odd number of sketches being multiplied, such as 3, we get the
|
|||
For $\est{3}$, multiplying an even number of sketches yields
|
||||
\begin{align*}
|
||||
&\expect{\sum_{j \in \sketchCols}\sCom{1}{j} \cdot \sCom{2}{j}}\\
|
||||
=&\expect{\sum_{j \in \sketchCols}\left(\sum_{\substack{\wVec \in \pw \st\\\hashP{\wVec} = j}}\gVP{1}{\wVec}\polP{\wVec}\cdot \sum_{\substack{\wVecPrime \in \pw \st\\\hashP{\wVecPrime} = j}}\gVP{2}{\wVecPrime}\polP{\wVecPrime}\right)}\\
|
||||
=&\expect{\sum_{j \in \sketchCols}\sum_{\substack{\wVec, \wVecPrime \in \pw \st\\\hashP{\wVec} = j\\\wVec = \wVecPrime}}\gVP{1}{\wVec}\gVP{2}{\wVec}\polP{\wVec}\polP{\wVec}\sum_{\substack{\wVec, \wVecPrime \in \pw \st\\\hashP{\wVec} = j\\\wVec \neq \wVecPrime}}\gVP{1}{\wVec}\gVP{2}{\wVecPrime}\polP{\wVec}\polP{\wVecPrime}}\\
|
||||
=&\expect{\sum_{\wVec \in \pw}\gVP{1}{\wVec}\gVP{2}{\wVec}}\\
|
||||
=&\gVP{1}{\wVec}\gVP{2}{\wVec}
|
||||
=&\expect{\sum_{j \in \sketchCols}\left(\sum_{\substack{\wOne \in \pw \st\\\hashP{\wOne} = j}}\gVP{1}{\wOne}\polP{\wOne}\cdot \sum_{\substack{\wTwo \in \pw \st\\\hashP{\wTwo} = j}}\gVP{2}{\wTwo}\polP{\wTwo}\right)}\\
|
||||
=&\mathbb{E}\big[\sum_{j \in \sketchCols}\sum_{\substack{\wOne, \wTwo \in \pw \st\\\hashP{\wOne} = j\\\wOne = \wTwo}}\gVP{1}{\wOne}\gVP{2}{\wOne}\polP{\wOne}\polP{\wOne} +\\
|
||||
&\qquad \gVP{1}{\wOne}\polP{\wOne}\sum_{\substack{\wOne, \wTwo \in \pw \st\\\hashP{\wOne} = j\\\wOne \neq \wTwo}}\gVP{2}{\wTwo}\polP{\wTwo}\big]\\
|
||||
=&\expect{\sum_{\wOne \in \pw}\gVP{1}{\wOne}\gVP{2}{\wOne}}\\
|
||||
=&\sum_{\wOne \in \pw}\gVP{1}{\wOne}\gVP{2}{\wOne}
|
||||
\end{align*}
|
||||
Following the reversal of the pattern of $\est{2}$, an odd number of sketches would produce an expectation of $0$, since each product in the sum has an operand whose expectation evaluates to $0$, as seen in the following,
|
||||
\begin{align*}
|
||||
|
@ -112,7 +113,9 @@ The case for an odd number of sketches can be reduced to the even case by includ
|
|||
\wTwo \neq \wOne}}\gVP{2}{\wTwo}\gVP{3}{\wTwo}.
|
||||
\end{align*}
|
||||
|
||||
|
||||
One potential work around would be to store additional sketches with independent $\pol$ functions. For $\est{2}$, this would result in
|
||||
\begin{align*}
|
||||
\end{align*}
|
||||
For the case of multiplication, when assumming independent variables, it is a known result that
|
||||
\[
|
||||
\varParam{X \cdot Y} = \expect{X^2}\expect{Y^2} - (\expect{X})^2 (\expect{Y})^2.
|
||||
|
|
Loading…
Reference in a new issue