See Add missing shape checks for the means argument to var[m] and std[m] by nalimilan · Pull Request #32 · JuliaStats/Statistics.jl · GitHub.