The state of an HyperLogLog sketch with precision parameter p requires $0.75 \cdot m = 0.75 \cdot 2^pbyteswheremdenotesthenumberofregisters.Theexpectedrelativestandarderrorisapproximatelygivenby\frac{1.039}{\sqrt{m}},\frac{1.037}{\sqrt{m}},and\frac{0.833}{\sqrt{m}}forthedefault,themaximum−likelihood(ML),andthemartingaleestimator,respectively.Thisisagoodapproximationforallp\geq 6andlargedistinctcounts.However,theerrorissignificantlysmallerfordistinctcountsthatareintheorderofmorsmaller.Thebiasisalwaysmuchsmallerthantheroot−mean−squareerror(rmse)andcanthereforebeneglected.Thefollowingchartsshowtheempiricallydeterminedrelativeerrorasafunctionofthetruedistinctcountforvariousprecisionparametersp$ based on 100k simulation runs. Distinct counts up to 1M were simulated by generating random values as hash values. For distinct counts above 1M, a different technique is used by randomly generating only hash values at distinct counts that can actually change the state of the data structure.
