locan.utils.statistics.biased_variance#
- locan.utils.statistics.biased_variance(variance, n_samples)[source]#
The sample variance is biased if not corrected by Bessel’s correction. This function yields the biased variance by applying the inverse correction.
\[E(variance_{biased}) = variance * (1 - 1 / localization_counts).\]- Parameters:
variance (
Union
[_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]]]) – An unbiased variance.n_samples (
Union
[_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]]]) – Number of samples from which the biased sample variance would be computed.
- Return type:
npt.NDArray[np.float64]