apaIsMeanDifferentFrom(Returns, ReferenceValue, ConfidenceLevel)
Excel
=apaIsMeanDifferentFrom(Returns, ReferenceValue, ConfidenceLevel)Result
Two-sided t-test whether the mean of a data series statistically differs from a reference value. Returns a TRUE/FALSE indication and the p-value.
Syntax
Returns: r x 1 vector of returns
ReferenceValue: reference value to test against
ConfidenceLevel: confidence level, e.g. 0.95.
Algorithm
t = √n·(mean − ReferenceValue) / s, with s the sample standard deviation. The result is TRUE if |t| exceeds the two-sided critical value of the t distribution with n − 1 degrees of freedom. The p-value is 2·T(−|t|).
