Questions tagged [quartile]

Quartiles are the values that divide a list of numbers into quarters.

Quartiles are the values that divide a list of numbers into quarters.

Further reference: https://www.mathsisfun.com/data/quartiles.html

115 questions
0
votes
1 answer

Google Sheets: get the value from data closest to the first quartile

For an array [21,22,24,24,26,97] I would like to get the median of the first half - 22. None of QUARTILE, QUARTILE.EXC or QUARTILE.INC does it (I did experiments). In Python numpy one can do it like: >>> import numpy as np >>> l = [21, 22, 24, 24,…
Maxim Blumental
  • 763
  • 5
  • 26
0
votes
2 answers

Quartiles and other parameters in groupby on multiple keys in pandas python

df columns are as below: Key1 Key2 Val1 Output needed I want groupby output where Val1 column has values clubbed together with groupby in python on keys Key1 and Key2. Output expected: df2 [groupby on key1 and key2] Key1 Key2 Val1 Count…
user12918844
0
votes
1 answer

Split values into Quartiles with case and aggregation statements

I have a Employee dataset like below. The start date is the employee's hire date and the end date is the date the employee left the employer. Both are in date datatype. Gender StartDate EndDate M 2010-04-30 2013-06-18 F …
vivianna
  • 99
  • 1
  • 11
0
votes
1 answer

Python Count per quantiles and pre set quartiles

I want to know if there is a code wherein I can count how many in my dataset goes to 25%, 50%, 75% and if there is a way to adjust the quartiles manually like 20% 40% 60% 80%, etc. Out[1]: ALC (mins) count 303.000000 …
Rolly V.
  • 25
  • 6
0
votes
2 answers

How do I group customers in to equal sets of revenue?

really struggling to come up with an answer for this one. There are various functions which provide Ntiles. Often these provide equal sets of rows per ntile. I require to group customers by (approximate) equal sets of revenue. This way I can show…
0
votes
1 answer

How to find the index value of the quartile values in an array using Matlab?

I have a vector of dimension 1x3000. I have found the percentile value using the percentile function in Matlab. But I am unable to find the index value of the quartile inside the vector. y = rand(1,3000); Q_2 = prctile(y,50); Idx =…
rishabh700
  • 92
  • 9
0
votes
2 answers

Make median and quartile split columns of data in data frame, based on condition (R)

If I use mtcars as an example: mtcars <- subset(mtcars, select = c("cyl", "disp")) How can I add two additional columns, one that indicates that values are below/above the median and one that indicates which quartile the values are in? However, I…
Sylvia Rodriguez
  • 1,203
  • 2
  • 11
  • 30
0
votes
1 answer

Attaching Appropriate Subset Quartiles to Dataset

I'm trying to add two columns to an NBA player dataset. The first column will establish what quartile the player's age is among all players within the dataset. The second additional column will establish which quartile an individual player's age…
MJP
  • 71
  • 1
  • 1
  • 4
0
votes
3 answers

Create variable in data frame using another column's Quartile value

I want to create a variable in a data frame, that would categorize the observations based on a column's Quartile/Median value. Below is what I tried.…
Salih
  • 391
  • 1
  • 13
0
votes
1 answer

How to replicate SUDAAN 75th percentile and 95% confidence intervals by age groups in R's 'survey' package?

I'm trying to replicate quantile estimates with 95% confidence intervals by age groups from SAS and SUDAAN in the 'survey' package in R with NHANES data. The package's 'svyby' function combined with its 'svyquantile' function allow you to perform…
0
votes
2 answers

Excel - calculate quartile and median to generate box plot given a list of values and counts

I have a rather simple task to achieve but I am not sure how to do that in excel. I have a list of values and number of counts of each value (my variable is discrete). I am trying to calculate 1st and 3rd quartiles of the variable given the counts I…
Maksim Khaitovich
  • 4,742
  • 7
  • 39
  • 70
0
votes
1 answer

Recursive quartile sorter in Javascript

I am building a quartile sorter in Javascript. Codepen is below. Drag headers in the table to gray area above the table to see the table sort. https://codepen.io/carbondesign/pen/MPPRPW?editors=0010 This code is working except for 2 problems: 1. I…
0
votes
1 answer

Changing Quartile range

i have some data a = pd.DataFrame([1,22,34,55,66,75,2,7,8,9,99,70,45,56,22,12,5,9,3,5,89,67,42,21]) when i use the describe function i get these below results: a.describe() Out[6]: 0 count 24.000000 mean 34.333333 std …
aim
  • 301
  • 1
  • 3
  • 10
0
votes
2 answers

R: Creating column with quartile rank for each date in panel data

I have the following panel data: idNum date salePrice 1 01.2018 1 1 02.2018 2 2 01.2018 3 2 02.2018 4 ... …
user9259005
  • 465
  • 1
  • 4
  • 12
0
votes
1 answer

Excel: How to add multiple criterias to an array calculation of Median and 1st Quartile

I have a question regarding a big excel-file I am working on right now. I have a long column of values (Column B) in a larger list of data. In Column C I have a connection to another values in the datalist that can be either TRUE or FALSE depending…
Carl
  • 101
  • 1
  • 11