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

Finding the mean and standard deviation of a data column in OpenOffice Calc

I have several data columns with 400 to 500 entries in each in a Calc spreadsheet. For each of these columns, I would like simply to be able to find the mean and standard deviation, but don't know how to proceed. Can someone please direct me…
David Laing
  • 31
  • 1
  • 1
  • 2
3
votes
2 answers

take standard deviation of datetime in python

I am importing the datetime library in my python program and am taking the duration of multiple events. Below is my code for that: d1 = datetime.datetime.strptime(starttime, '%Y-%m-%d:%H:%M:%S') d2 = datetime.datetime.strptime(endtime,…
Chango Mango
  • 61
  • 4
  • 8
3
votes
2 answers

How do I transform an Inverse CDF coded for a standard deviation of one to a different STDDEV?

I am doing rejection sampling as part of an algorithm for numerical integration using an inverse cumulative distribution function (CDF). I found two possible implementations: In C and Java (and others, but not C#, so I would need to translate):…
Paul Chernoch
  • 5,275
  • 3
  • 52
  • 73
3
votes
2 answers

Online algorithm for calculating standard deviation

Normally, I have a more technical problem but I will simplify it for you with an example of counting balls. Assume I have balls of different colors and one index of an array (initialized to all 0's) reserved for each color. Every time I pick a ball,…
Erol
  • 6,478
  • 5
  • 41
  • 55
3
votes
1 answer

R calculate sd of parts of a matrix/array

sorry to post this as I know this has come up before in various guises but I really don't understand what I am doing wrong/the inner-workings of R! I have an (multi dimensional) array of data that I have read in from a netcdf file that I am playing…
Alex Archibald
  • 407
  • 1
  • 6
  • 14
3
votes
2 answers

Removing outliers in R

I have looked at a set of data and decided it would be good to remove outliers, with an outlier having the definition of being 2SD away from the mean. If I have a set of data, say 500 rows with 15 different attributes, how can I remove all the rows…
ThePerson
  • 3,048
  • 8
  • 43
  • 69
2
votes
1 answer

Calculating Covariance Matrix of Two Distributions In Python

I would like to calculate the Covariance matrix of two distributions, what could be the possible ways to calculate them in python?
pacodelumberg
  • 2,214
  • 4
  • 25
  • 32
2
votes
1 answer

How to decrease execution time of standard deviation calculated azimuthally

I am using the below code to calculate standard deviation azimuthally for 2D array converted from images. However, the code takes couple minutes to run. Can anyone suggest how this can be made faster? import numpy as np def radial_profile(data,…
Bahauddin Omar
  • 155
  • 1
  • 8
2
votes
1 answer

Python dataframe: Standard deviation of last one year of data

I have dataframe df with daily stock market for 10 years having columns Date, Open, Close. I want to calculate the daily standard deviation of the close price. For this the mathematical formula is: Step1: Calculate the daily interday change of the…
Sinha
  • 431
  • 1
  • 5
  • 12
2
votes
3 answers

find sum of squares after grouping two cols

I had a dataset that looks like this: Value Type X_sq -1.975767 Weather -0.540979 Fruits -2.359127 Fruits -2.815604 Corona -0.929755 Weather I wanted to iterate through each row and calculate a sum of…
x89
  • 2,798
  • 5
  • 46
  • 110
2
votes
1 answer

Inconsistent results from pandas.rolling.std()

As you can see, the code is from the PANDAS official example, the STD of the last 3 numbers(5,5,5) should be 0, but it's not in the example. In [1]: s = pd.Series([5,5,6,7,5,5,5]) In [2]: s.rolling(3).std() Out[2]: 0 NaN 1 …
Jake
  • 37
  • 4
2
votes
1 answer

Can Scipy.optimize.differential_evolution compute SD or SE of estimated parameters?

I used Scipy.optimize.differential_evolution to estimate parameters for my models; however, unlike Curve_fit, it cannot retire covariance. How can I calculate the uncertainties of my parameters?
2
votes
3 answers

Stocks - Calculating Volatility of a Time Series

I have this simple dataset of a stock price, where Col1 is for Dates, Col2 is for Returns (Close Price D / Close Price D-1, the same as the pct_change in Python) and Col3 for the Ewma Volatility. I'm working with projections and were ploting the…
2
votes
1 answer

How to get mean and standard deviation of daytimes in java

For an Android Studio project written in Java, I've got a List of daytimes which collects hours and minutes as integers like this: List times = new ArrayList<>(); int hour = 16; int minute = 25; int time = hour * 60 +…
Talia
  • 23
  • 5
2
votes
1 answer

Calculating mean and sd of bedtime (hh:mm) in R - problem are times before/after midnight

I got the following dataset: data <- read.table(text=" wake_time sleep_time 08:38:00 23:05:00 09:30:00 00:50:00 06:45:00 22:15:00 07:27:00 23:34:00 09:00:00 23:00:00 09:05:00 00:10:00 06:40:00 23:28:00 10:00:00 23:30:00 …
psycho95
  • 131
  • 1
  • 12