Skip to content

tinybike/WeightedStats.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeightedStats

Build Status Coverage Status

A tiny Julia package which calculates weighted medians and means. Yep, that's it!

Usage

Installation:

julia> Pkg.clone("git://github.com/tensorjack/WeightedStats.jl.git")

Use:

julia> using WeightedStats

julia> data = [2, 0.6, 1.3, 0.3, 0.3, 1.7, 0.7, 1.7, 0.4];

julia> weights = [2, 2, 0, 1, 2, 2, 1, 6, 0];

julia> println(weighted_median(data, weights))
1.7

julia> println(weighted_mean(data, weights))
1.275

Boom!

Tests

$ julia test/runtests.jl

About

Basic weighted statistics for Julia.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages