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

How to select columns by name or their standard deviation simultaneously?

Solution I went with the solution provided by @thelatemail because I'm trying to stick with tidyverse and thus dplyr--I'm still new to R, so I'm taking baby steps and taking advantage of helper libraries. Thank you everyone for taking the time to…
3
votes
1 answer

Detect Outliers using BigQuery with Standard Deviation

I currently have a table in BigQuery that contains some outliers Example table: port - qty - datetime -------------------------------- TCP1 - 13 - 2018/06/11 11:20:23 UDP2 - 15 - 2018/06/11 11:24:24 TCP3 - 14 - 2018/06/11 11:24:27 TCP1 - 2 -…
taN
  • 63
  • 1
  • 5
3
votes
2 answers

Calculating standard deviation on list ignoring zeros using numpy

I am having a list pct_change. I need to calculate std deviation on the list ignoring the zeros. I tried below code, but it is not working as expected. import numpy as np m = np.ma.masked_equal(pct_change, 0) value = m.mask.std() Input value:…
Arvinth Kumar
  • 964
  • 3
  • 15
  • 32
3
votes
2 answers

Algorithm for Distributed Standard Deviation

I currently have an algorithm for finding the standard deviation on a cluster of machines where one node will request the whole data set from other nodes across a network and run the standard deviation calculation over the data once it is…
Andy Till
  • 3,371
  • 2
  • 18
  • 23
3
votes
1 answer

Different results np.std() when used within pandas and standalone

I have some code and do not understand why applying np.std delivers two different results. import numpy as np import pandas as pd a = np.array([ 1.5, 6. , 7. , 4.5]) print 'mean value is:', a.mean() print 'standard deviation is:', np.std(a) Next…
paulchen
  • 1,009
  • 1
  • 10
  • 17
3
votes
1 answer

R, bit64, problems calculating row mean and standard deviation in data.table

I am trying to work with larger numbers, over 2^32. While I am also using data.table and fread, I do not believe the problem is related to them. I can turn on and off they symptoms without changing data.table or having used fread. My symptoms are…
3
votes
2 answers

Table of mean (SD)s

I have a relatively large dataset, and I want to print a table of means and standard deviations for combinations of factors. I would like to have them in a format like this: A B test1 2.0 (1.0) 5.0 (2.0) test2 6.3 (3.1) …
Jonas Lindeløv
  • 5,442
  • 6
  • 31
  • 54
3
votes
2 answers

Writing a standard deviation function

I have a dictionary of words as keys and ints as value. It outputs as such: print (word_ratings_dict) {'hate': [1, 2, 2, 1, 1, 3, 0, 2, 3, 2, 0, 4, 1, 1], 'joy': [3, 4, 3, 3, 2, 4, 1]} For each key word in the dictionary, I need to calculate its…
3
votes
2 answers

Finding the 'Outliers' in numeric data set

I want to compare (sorty by) growth rates and disadvantage high rates with very low starting values. Example: 1. Start: 1.000.000 End: 1.100.000 Growth: +10% Start: 100.000 End: 120.000 Growth: +20% 3. Start: 1 End: 10 Growth: +900% Start:…
root66
  • 477
  • 5
  • 17
3
votes
1 answer

Linear regression slope error in numpy

I use numpy.polyfit to get a linear regression: coeffs = np.polyfit(x, y, 1). What is the best way to calculate the error of the fit's slope using numpy?
mikael
  • 2,097
  • 3
  • 18
  • 24
3
votes
1 answer

How to calculate per-page STD in matlab?

Suppose I have matrix A of 100x200x300. Third dimension is called "page" in Matlab and this matrix has 300 pages then. Now I want to calculate standard deviation within each page and get a result matrix of 1x1x300. I can't just…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
3
votes
3 answers

bc not executing via script

Hi I have a script which I am using to calculate the standard deviation from a set of values returned from a server. I can easily retrieve the commands and build a valid string with the command. bc <<< "scale=10;…
Charabon
  • 737
  • 2
  • 11
  • 23
3
votes
2 answers

How to find the normal distribution in Javascript?

I'm trying to convert a formula from an Excel spreadsheet into an online calculator, the formula specifically is: =(NORM.S.DIST(2.5467437 + -1.9344945 *B7^( -0.5),1))^2 The problem I'm encountering is that NORM.S.DIST doesn't appear to exist in any…
Michael A
  • 9,480
  • 22
  • 70
  • 114
3
votes
2 answers

standard deviation of a UIImage/CGImage

I need to calculate the standard deviation on an image I have inside a UIImage object. I know already how to access all pixels of an image, one at a time, so somehow I can do it. I'm wondering if there is somewhere in the framework a function to…
ste72
  • 45
  • 1
  • 4
3
votes
2 answers

Online Algorithm for Standard Deviation Proof

I saw this algorithm in an answer to this question. Does this correctly calculate standard deviation? Can someone walk me through why this works mathematically? Preferably working back from this formula: public class Statistics { private int…