Inverse Variance Weighted Mean
Inverse-variance weighted means are typically used in statistical analysis, especially to account for variation in uncertainties within an aggregated or compiled dataset.
y = ivwmean(x,var) returns the Inverse Variance Weighted Mean of the elements of "x" weighted by the inverse of the variance "var"
NOTE
Each element of "x" requires a corresponding variance, and hence the size of "var" must match that of "x".
SYNTAX
y = ivwmean(x,var)
EXAMPLE
x = [ 1.2; 1.3; 1.4; 1.2; 1.3; 1.4]
var = [0.0025; 0.0225;0.0100;0.0625;0.5625;0.0006]
m =ivwmean(x,var)
x =
1.2000
1.3000
1.4000
1.2000
1.3000
1.4000
var =
0.0025
0.0225
0.0100
0.0625
0.5625
0.0006
y =
1.3606
Cite As
Henry Henson (2024). Inverse Variance Weighted Mean (https://www.mathworks.com/matlabcentral/fileexchange/67789-inverse-variance-weighted-mean), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics > Sparse Matrices >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |
Updated Description
|