JuliaStats / Statistics.jl

The Statistics stdlib that ships with Julia.
https://juliastats.org/Statistics.jl/dev/
Other
71 stars 40 forks source link

Weighted Mean #123

Open JakeZw opened 2 years ago

JakeZw commented 2 years ago

When I follow along the help for mean

`julia> using Statistics

julia> n=20;

julia> x=rand(n);

julia> w=rand(n);

julia> mean(x, weights(w))`

I get an error until I enter

using StatsBase

The help for mean (and all stats functions that have the weighted option) should make it clear that this method requires StatsBase.

nalimilan commented 2 years ago

This only happens if you have already loaded StatsBase though. Anyway the plan is to merge StatsBase and Statistics, which should fix this.