[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #10103] [octave] (statistics) Weighted sta
From: |
anonymous |
Subject: |
[Octave-patch-tracker] [patch #10103] [octave] (statistics) Weighted standard deviation for 'std' |
Date: |
Mon, 30 Aug 2021 05:42:12 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 |
URL:
<https://savannah.gnu.org/patch/?10103>
Summary: [octave] (statistics) Weighted standard deviation
for 'std'
Project: GNU Octave
Submitted by: None
Submitted on: Mon 30 Aug 2021 09:42:10 AM UTC
Category: Core : new feature
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email: s.guidoni@virgilio.it
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This is the std function with weighted standard deviation.
It belongs to the core, but it could be added to the statistics package if you
do not want it in the core.
Example:
octave:6> std(x)
ans =
1.5239 1.5811 2.8067
octave:7> w = [1 7 8 5 19 3 4 27 1 2]
w =
1 7 8 5 19 3 4 27 1 2
octave:8> std(x, w)
ans =
1.5995 1.4361 2.2017
octave:9> help std
-- std (X)
-- std (X, W)
-- std (X, W, DIM)
Compute the standard deviation of the elements of the vector X.
The standard deviation is defined as
std (X) = sqrt ( 1/(N-1) SUM_i (X(i) - mean(X))^2 )
where N is the number of elements of the X vector.
If X is a matrix, compute the standard deviation for each column
and return them in a row vector.
The argument W determines the weighting scheme to use. Valid
values are
0:
normalize with N-1, provides the square root of the best
unbiased estimator of the variance [default]
1:
normalize with N, this provides the square root of the second
moment around the mean
a vector:
compute the weighted standard deviation with nonnegative
scalar weights, the length of W must be equal to the size of X
along dimension DIM
If the optional argument DIM is given, operate along this
dimension.
See also: var, bounds, mad, range, iqr, mean, median.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 30 Aug 2021 09:42:10 AM UTC Name: std.m Size: 5KiB By: None
<http://savannah.gnu.org/patch/download.php?file_id=51838>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?10103>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #10103] [octave] (statistics) Weighted standard deviation for 'std',
anonymous <=