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
4
votes
2 answers

Why does na.rm=TRUE not work for weighted SD in R?

I have a dataframe of 10 columns with house prices, that in some cases, includes NAs. I want to create a new column of weighted sd but for the rows that have a few NAs, I get the following error: Error in e2[[j]] : subscript out of bounds What I…
foo
  • 33
  • 6
4
votes
1 answer

How to calculate standard deviation of circular data

I've followed the advice laid out here for calculating the average of circular data: https://en.wikipedia.org/wiki/Mean_of_circular_quantities But I'd also like to calculate standard deviation as well. #A vector of directional data (separated by 20…
Vint
  • 413
  • 6
  • 17
4
votes
1 answer

Mean and standard deviation of lognormal distribution do not match analytic values

As part of my research, I measure the mean and standard deviation of draws from a lognormal distribution. Given a value of the underlying normal distribution, it should be possible to analytically predict these quantities (as given at…
James
  • 123
  • 8
4
votes
3 answers

Pandas variance and Standard deviation result differing with manual calculation

I'm trying to fin Mean, Variance and SD using pandas. However, manual calcuation is different from that of pandas output. is there anything i'm missing using pandas. Attached the xl screenshot for reference import pandas as pd dg_df =…
luckyluke
  • 642
  • 2
  • 7
  • 22
4
votes
1 answer

How to plot line with standard deviation of each row with ggplot

I want to plot a graph with the median of each row (not column!)(except values from the first column) with the standard deviation as errorbar. The result should look similar to that: I have a dataframe like this: myTable <- " 1 -50 …
schande
  • 576
  • 12
  • 27
4
votes
1 answer

Detecting outliers in a Pandas dataframe using a rolling standard deviation

I have a DataFrame for a fast Fourier transformed signal. There is one column for the frequency in Hz and another column for the corresponding amplitude. I have read a post made a couple of years ago, that you can use a simple boolean function to…
Jack
  • 41
  • 1
  • 3
4
votes
1 answer

What’s the difference between sx and σx in the statistics calculations on a TI-Nspire?

I know that sx is the standard deviation of a sample and σx is the standard deviation of a population. My question is, does the TI-Nspire think that the data I entered is a sample or the population? If it think’s (A) my data is a sample, how is σx…
lukejanicke
  • 977
  • 1
  • 9
  • 25
4
votes
1 answer

Pandas standard deviation on one column for subset of rows

I'm new to working with Python and Pandas. Currently I'm attempting to create a report that extracts data from an SQL database and using that data in a pandas dataframe. In each row is a server name and date of sample and then sample data per column…
Thomas
  • 103
  • 1
  • 2
  • 8
4
votes
1 answer

Calculation of scatterplot Standard Deviation in R

I have created a scatter plot of two vectors, using R, combined with a line (using abline) which represents the x=y diagonal. I wish to calculate the standard deviation of the dots from the diagonal, and color the area which is found between the…
HEnav
  • 133
  • 1
  • 3
  • 7
4
votes
1 answer

What's the equivalent averageifs for standard deviation?

I have asked aboutand already got answer about averageifs excel function here. However, I was also wondering if I can get standard deviation for the same data set in new column. Here is the screenshot of sample data:
alpha189
  • 93
  • 1
  • 8
4
votes
1 answer

Standard deviation from center of mass along Numpy array axis

I am trying to find a well-performing way to calculate the standard deviation from the center of mass/gravity along an axis of a Numpy array. In formula this is (sorry for the misalignment): The best I could come up with is this: def…
NichtJens
  • 1,709
  • 19
  • 27
4
votes
1 answer

Pandas standard deviation miracle

Here is my code: import pandas as pd df = pd.DataFrame({'Test': [861166021755746, 861166021755746, 861166021755746]}) print(df.describe()) Here is the output (please note the value of std): Test count 3.000000e+00 mean 8.611660e+14 std …
user1700890
  • 7,144
  • 18
  • 87
  • 183
4
votes
4 answers

Probability of getting specific sum after rolling n dice. Ruby

What is the best solution for finding probability of rolling sum with n dice? I'm solving it by finding mean. standard deviation. z_score for the numbers below x z_score for the numbers above x converting both to probabilities subtracting one from…
Pav31
  • 540
  • 7
  • 19
4
votes
1 answer

Overwrote built in function - Standard deviation

I want to have a std.m file for the standard deviation. It is in data fun toolbox, but, by mistake, I changed the code and the std command is not working anymore. How can I run the original std (standard deviation) command?
Mayank Lakhani
  • 193
  • 1
  • 13
4
votes
4 answers

How can I color the area below several normal distributions?

After several tries, I finally could obtained a unique figure with several normal distributions. In those distributions, the 1sd was also drawn as vertical rectangles. The code I used is this…
antecessor
  • 2,688
  • 6
  • 29
  • 61