Inverse Variance Weighted Mean

Inverse Variance Weighted Mean
97 Downloads
Updated 19 Jun 2018

View License

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 (2026). Inverse Variance Weighted Mean (https://www.mathworks.com/matlabcentral/fileexchange/67789-inverse-variance-weighted-mean), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Sparse Matrices in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0

Updated Description
Updated description
Updated Description
Updated Description