Questions tagged [standard-deviation]

Standard deviation (represented by the symbol sigma, σ) shows how much variation or "dispersion" exists from the average (mean, or expected value).

The standard deviation of a random variable, statistical population, data set, or probability distribution is the square root of its . A standard deviation close to 0 indicates that the data points tend to be very close to the mean (also called the expected value) of the set, while a high standard deviation indicates that the data points are spread out over a wider range of values.

The standard deviation of X is the quantity

enter image description here

870 questions
9
votes
3 answers

existing function to combine standard deviations in R?

I have 4 populations with known means and standard deviations. I would like to know the grand mean and grand sd. The grand mean is obviously simple to calculate, but R has a handy utility function, weighted.mean(). Does a similar function exist…
Sam Swift
  • 913
  • 1
  • 11
  • 17
9
votes
1 answer

Function for testing system stability, which receives predicted time series as input

I want to write a function that gets a time series and a standard deviation as parameters and returns an adjusted time series which looks like a forecast. With this function I want to test a system for stability, which gets a forecasted time series…
9
votes
2 answers

Rolling and cumulative standard deviation in a Python dataframe

Is there a vectorized operation to calculate the cumulative and rolling standard deviation (SD) of a Python DataFrame? For example, I want to add a column 'c' which calculates the cumulative SD based on column 'a', i.e. in index 0, it shows NaN due…
Roy
  • 507
  • 10
  • 22
9
votes
2 answers

Return std and confidence intervals for out-of-sample prediction in StatsModels

I'd like to find the standard deviation and confidence intervals for an out-of-sample prediction from an OLS model. This question is similar to Confidence intervals for model prediction, but with an explicit focus on using out-of-sample data. The…
8
votes
1 answer

Mean Std in pandas data frame

Having a pandas data frame as follow: a b 0 1 12 1 1 13 2 1 23 3 2 22 4 2 23 5 2 24 6 3 30 7 3 35 8 3 55 I want to find the mean standard deviation of column b in each group. My following code give me 0 for each…
Elham
  • 827
  • 2
  • 13
  • 25
8
votes
1 answer

How to calculate Normalised Mean Square Error (NMSE) and why to use it?

I've been told I need to normalise my MSE for my thesis involving neural networks. Equations for NMSE seem a bit few and far-between. I have the following and want to corroborate it if possible: Is the standard deviation term supposed to be…
8
votes
1 answer

Is there any difference between numpy.std and excel STDEV function?

I have a list: s = [0.995537725, 0.994532199, 0.996027983, 0.999891383, 1.004754272, 1.003870012, 0.999888944, 0.994438078, 0.992548715, 0.998344545, 1.004504764, 1.00883411] where I calculated its standard deviation in Excel, I got the answer:…
ChangeMyName
  • 7,018
  • 14
  • 56
  • 93
8
votes
1 answer

How do I calculate the standard deviation between weighted measurements?

I have several weighted values for which I am taking a weighted average. I want to calculate a weighted standard deviation using the weighted values and weighted average. How would I modify the typical standard deviation to include weights on each…
Steven C. Howell
  • 16,902
  • 15
  • 72
  • 97
8
votes
1 answer

StDev() function returns Null when table contains only one row

I am trying to use the StDev function and am getting blank results. I am using it as... SELECT StDev(fldMean) FROM myTable Where fldMean contains a value of 2.3 and should evaluate to 0 but instead I am simply getting an empty result. I can't seem…
codingManiac
  • 1,654
  • 4
  • 29
  • 42
8
votes
2 answers

How to calculate a pooled standard deviation in R?

I want to calculate the pooled (actually weighted) standard deviation for all the unique sites in my data frame. The values for these sites are values for single species forest stands and I want to pool the mean and the sd so that I can compare…
Antra
  • 85
  • 1
  • 1
  • 4
7
votes
1 answer

Descriptive statistics in Python /with Pandas with std in parentheses

This question concerns the best-practice to do descriptive statistics in Python with a formatted output that correspond to tables found in academic publications: means with their respective standard deviations in parenthesis below. Final goal is to…
Adrien Pacifico
  • 1,649
  • 1
  • 15
  • 33
7
votes
2 answers

Swift Accelerate for Mean & Standard Deviation

I am looking at Accelerate to compute mean and standard deviation of arrays in Swift. I can do the mean. How do I do the standard deviation? let rr: [Double] = [ 18.0, 21.0, 41.0, 42.0, 48.0, 50.0, 55.0, 90.0 ] var mn: Double =…
Pat
  • 325
  • 1
  • 12
7
votes
3 answers

Removing outliers easily in R

I have data with discrete x-values, such as x = c(3,8,13,8,13,3,3,8,13,8,3,8,8,13,8,13,8,3,3,8,13,8,13,3,3) y = c(4,5,4,6,7,20,1,4,6,2,6,8,2,6,7,3,2,5,7,3,2,5,7,3,2); How can I generate a new dataset of x and y values where I eliminate pairs of…
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
6
votes
3 answers

How to calculate the Standard Deviation of a column inside gnuplot

Hello I want to know how I can calculate the standard deviation of a column of a data file using gnuplot. I know gnuplot to refer to a column using n $ n, but how do I (could serve a function) to add all values ​​of $ n. That's all I can't do in…
Bruce_Warrior
  • 1,161
  • 2
  • 14
  • 24
6
votes
3 answers

Combine dataframes for means and sd's into one dataframe with sd in brackets after the mean

I would like to create a data frame with several different columns containing means, after which the sd is shown in brackets. To give an example: df <- iris mean <- aggregate(df[,1:4], list(iris$Species), mean) sd <- aggregate(df[,1:4],…
BWolk
  • 193
  • 1
  • 9
1 2
3
57 58