Questions tagged [iqr]

IQR stands for "Interquartile range" in statistics.

Interquartile range (statistics) equals to the difference between the third and first quartiles. A really nice alternative to show dispersion instead of standard deviation.

This descriptive statistic could be familiar from boxplots.

75 questions
1
vote
1 answer

Excluding outliers based on multiple columns in R ? IQR method

I'm currently trying to exclude outliers based on a subset of selected variables with the aim of performing sensitivity analyses. I've adapted the function available here: calculating the outliers in R), but have been unsuccesful so far (I'm still a…
M_Oxford
  • 361
  • 4
  • 11
1
vote
2 answers

Calculating statistical data for data sets by using single values with multiple quantities in Google Sheets

In Google Sheets, I've been working on data sets of varying prices to compare them to actual costs and excluding values outside of the normal ranges. I've had help previously, but I am unable to design more formulas based on the original formulas…
1
vote
2 answers

Different Q1 and Q3 values in python calculation from TI-nspire

I calculated the upper quartile (Q3 or 75%-tile) and lower quartile (Q1 or 25%-tile) using Numpy/Pandas and TI-nspire. But I get different values. Why does this happen? From (5+8)/2=6.5 and (18+21)/2=19.5, Numpy/Pandas Q1 and Q3 are wrong. Why does…
shin
  • 31,901
  • 69
  • 184
  • 271
1
vote
2 answers

How to calculate modified Z score and IQR on each column of the dataframe

I have a data frame and i am trying to clean the data before my analysis. I am putting a sample data for trial as my data is bit complex. A B C D 30 24 13 41 30 25 14 45 30 27 15 44 30 28 16 43 31 21 12 4 31 2 17 99 3 89 99 45 78 24 0 …
zsh_18
  • 1,012
  • 1
  • 11
  • 29
1
vote
2 answers

How to aggregate on IQR in SPSS?

I have to aggregate (of course with a categorical break variable) a quite big data table containing some continuous variables by resulting the mean, median, standard deviation and interquartile range (IQR) of the required variables. The first three…
daroczig
  • 28,004
  • 7
  • 90
  • 124
1
vote
3 answers

Applying Pandas Function to rows and columns simultaneously for Confidence Interval Calculations

I am new to python programming. I am trying to determine outliers in my data set. I have converted the data set to a pandas data frame and then applying the IQR principle. After that I want to replace my OUTLIERS by zero and then calculate the mean…
New_Coder
  • 23
  • 5
1
vote
1 answer

Generation of Interquartile Positions With Increasing Depth

I wanted to generate the interquartile (IQR) positions programmatically so that I could use them as a basis for obtaining values within a min - max range, with increasing orders of granularity. I got stuck on this for a while. Surprisingly, when I…
Miniman
  • 221
  • 1
  • 4
  • 16
1
vote
1 answer

Getting interquartile range and median from pandas groupby, zero-padding for all unmentioned dates

I have a dataframe like (except mine is very large): user1 user2 day hour quantity ------------------------------------- Alice Bob 1 12 250 Alice Bob 1 13 250 Bob Carol 1 10 20 Alice …
irene
  • 2,085
  • 1
  • 22
  • 36
1
vote
2 answers

Tukey Boxplots in Matplotlib - outlier logic in the code?

While reading the answers to a related question in StackOverflow, I saw the code used in matplotlib to compute the wiskers positions and detect outliers: # get high extreme iq = q3 - q1 hi_val = q3 + whis * iq wisk_hi = np.compress(d…
ttsiodras
  • 10,602
  • 6
  • 55
  • 71
1
vote
1 answer

R summary function

I am following an example at KhanAcademy.com regarding box plots. I tried to simulate the question in R with the following code x <- c(13,9,11,8,8,12,9,9,4,12,10,8,11) summary(x) Min. 1st Qu. Median Mean 3rd Qu. Max. 4.000 8.000 9.000 …
chribonn
  • 445
  • 5
  • 20
0
votes
0 answers

Power BI - Filter Table by Interquartile Range Measure Dynamically

I have the following table. I cannot show the activities, but essentially I have a list of activities and several metrics of the activity duration (count, sum, min, max, median, average, and upper interquartile range). The data has heavy outliers as…
Victor G
  • 37
  • 6
0
votes
0 answers

Interquartile Range (IQR) in Exploratory Data Analysis

I am a newby and trying to perform some EDA on a dataset that contains also object type columns. I have already cleaned up the dataset, eliminating nan and duplicates and I am trying to eliminate outliers using the IQR method. I have calculated the…
AlexM
  • 1
0
votes
0 answers

How does R calculate boxplot.stats compared to summary/Quantile for customized Boxplot Hinges and Wiskers?

I was trying to create a boxplot with a custom Wiskers range where the Wiskers alling with a 95% Range of the total values, and would have liked to do so with the boxplot(x, range = c(0.025, 0.975)) however this didn´t work and when I looked into…
0
votes
1 answer

Python: calculating the 2 and 3 quartiles per group in a dataset

I have the following dataframe: df = code count A 1 A 2 A 3 A 4 B 7 B 8 B 9 B 10 I want to produce the 25 and 75 quartiles per code: code 25QT 75QT A 2.5 3.5 B 8.5 9.5
Economist_Ayahuasca
  • 1,648
  • 24
  • 33