different strategies for finding Quartile in excel - excel

let us consider following data
9
5
3
10
14
6
12
7
14
i would like to find `Q1,Q2,Q3,let sort data
3
5
6
7
9
10
12
14
14
in excel we can calculate it very easily
=QUARTILE(A2:A10,1)
=QUARTILE(A2:A10,2)
=QUARTILE(B2:B10,3)
results are
6
9
12
but if we calculate by hand, we will get following results
5.5
9
13
why is result so different?thanks in advance

The definition of Quartile is not unequivocally. So there are multiple methods to calculate the Quartile. See https://en.wikipedia.org/wiki/Quartile
In Excel there are multiple Quartile functions now, see https://support.office.com/en-us/article/QUARTILE-function-93cf8f62-60cd-4fdb-8a92-8451041e1a2a?ui=en-US&rs=en-US&ad=US
QUARTILE and QUARTILE.INC uses Method 2 while QUARTILE.EXC uses Method 1.

Related

How to generate the equal number of groups per week that have members that change the group every week

I have been trying to create an excel that I can use to assign members to a group per week. I need to make sure that each member is in the different group every week.
Below is my excel and here is the formula I use in B3
=INDEX(UNIQUE(RANDARRAY(2, 10, 1, 11)), SEQUENCE(1), {1,2,3,4,5,6,7,8,9,10,11})
The issue i cannot fix is the fact that the groups differ in sizes? Any ideas please.
Week 1 2
PPLs
1 7 8
2 6 11
3 1 3
4 2 7
5 9 7
6 2 10
7 4 8
8 4 5
9 10 8
10 8 9
11 3 6
12 8 6
13 7 9
14 7 8
15 5 8
16 5 8
17 8 8
18 8 10
19 4 9
20 3 2
21 10 9
22 2 10
23 10 6
24 9 3
25 4 9
26 7 6
27 10 7
28 7 7
29 10 5
30 2 5
31 6 6
32 8 8
33 4 4
34 9 10
35 5 9
36 9 7
37 5 7
38 10 9
39 2 10
40 6 5
41 9 2
2 thoughts : simple&(somewhat)repeatable OR noExcel&random.
[ simple&(somewhat)repeatable ]
2 sets only.
Set 1 : group 1 is {member 1-10}, group 2 is {member 11-20} .. group 10 is {member 91-100}
Set 2 : group 1 is {member 1,11,21,31,41,51,61,71,81,91}, group 2 is {member 2,12,22,32,42,52,62,72,82,92} .. group 10 is {member 10,20,30,40,50,60,70,80,90,100}
p/s : although member 1 is always is group 1.. I'd consider it is as a valid group change, since ALL other members of group 1 had changed.
[ noExcel&random ]
Ever heard of 10x10 sudoku? it is widely available online. I have no specific one.. But Sudoku, IS what I meant by noExcel.
example 10x10 sudoku solution :
how to use it :
get 5 different (different is important) solved 10x10 sudoku set, and put it one on top of each other. We should get a 10(col)x50(row) table.
Sort by all 1st row, shall have the sequence (from top, in column 1) : 1,1,1,1,1,2,2,2,2,2,3,3,3,3,3, .. 9,9,9,9,9,10,10,10,10,10
Since we have 50 members (10groups, 5members each). Column 1 will be the assigned group for 50 respective (row) member in week1, Column 2 will be the assigned group for week2... and so on.
if every week is different group, then by week 11 it will come back to his/her original group. OR .. another (5 10x10 sudoku) set perhaps?
(If the idea is unclear.. please ask)
AFAIK. with the rules of sudoku itself, each member(row) will have a different group each week(column), and each element (group number) WILL be repeated for 5 times for each week(column). Thus, solve the
the fact that the groups differ in sizes
part. (please share if this doesn't work though..)
ref : I used https://sudokuspoiler.azurewebsites.net/Sudoku/Sudoku10 to solve http://www.sudoku4me.com/sudoku%2010x10.php puzzle (this solver need 0 to be replaced with 10). As long as it is a valid sudoku solution, it should be fine. Some sudoku use letters instead of numbers. Still, the idea applies.
p/s : I tried excel built in random number generator to generate a ranked (sorted) list, but still end up unable get consistent 5 members per group arrangement, with different group each week (same trouble as OP). I had a fond memory with 9x9 Sudoku, glad to know it came in handy for this solution.

Using Excel to allocate values based off their rank while remaining within constraints

I am trying to create a resource calculator that can tell me how many people i need to put on each section depending on the current work waiting and work coming in. Prioritizing sections which have the most work waiting first.
Upper Limit Allocation Prod Ranking
12 [to calc] 28% 1
15 18% 2
5 17% 3
4 8% 4
2 6% 5
3 .2% 6
4 .2% 6
Similar to the other question I have a constraint that i only have so much to allocate. For this example we will use 38 as the amount that is to be allocated.
I have used the formula from the other answer:
=MIN(A2,$E$1-SUMIF($D$2:$D$8,"<"&D2,$B$2:$B$8))
Where E1 contains the total to be allocated.
I have two issues with this formula:
1)The issue that I am having is that I require a minimum value of atleast 1 person in each of these sections.
I have tried using a max function to simply set this value, however this leads to the resources allocated going over the total amount.
What equation would I need to use to make it account for both the total available to allocate, the minimum requirement for each fund and the maximum limit for each fund.
2) It only returns solid integers, would there be a way to retreive more precise results, maybe by changing it to a % distribution?
UL Alloc Rank Capacity Lower Limit
2 1 15 93 1
3 1 15
4 1 15
6 6 8
1 1 15
2 1 15
4 4 9
2 2 7
4 4 4
15 15 2
12 12 10
12 12 1
1 1 11
13 13 5
6 6 6
5 1 15
5 5 3
1 1 14
2 2 13
3 3 12
3 1 15
Reference: Using the Excel's Rank() function to calculate allocations based on ranking and constraints
Simply subtract the 100 on all sides and add them separately:
=MIN(A2-100,($E$1-100*COUNTA($A$2:$A$8))-(SUMIF($D$2:$D$8,"<"&D2,$B$2:$B$8)-COUNTIF($D$2:$D$8,"<"&D2)*100))+100
What is returned depends on your entries in Column A and in E1. You can change Column A based on a percentage distribution and the formula will return the corresponding values.
Edit:
If you set your lower threshold into F2, your Constraint into E2, using this formula
=MIN(A2-$F$2,($E$2-$F$2*COUNTA($A$2:$A$8))-(SUMIF($D$2:$D$8,"<"&D2,$B$2:$B$8)-COUNTIF($D$2:$D$8,"<"&D2)*$F$2))+$F$2
the result looks like this:

Excel - calculating the median without removing duplicates

I have a table that looks like this:
ID Total
3 3
3 3
3 3
4 11
4 11
4 11
4 11
4 11
4 11
6 9
6 9
7 13
7 13
7 13
7 13
7 13
7 13
7 13
7 13
7 13
7 13
7 13
7 13
7 13
I would like to calculate the median of column B (Total), excluding duplicate combinations of columns A and B. This could be achieved by constructing a table as below, and calculating the median from that table.
ID Total
3 3
4 11
6 9
7 13
Is there any way of obtaining the median without having to go through this process of manually deleting duplicates?
=MEDIAN(IF(FREQUENCY(MATCH(A2:A25&"|"&B2:B25,A2:A25&"|"&B2:B25,0),ROW(A2:A25)-MIN(ROW(A2:A25))+1),B2:B25))
There is a way with two additional columns. The first column is concatenation of ID and Total, the second counts occurences of each individual combination. Then you just do the median on those rows where the combination occurs for the first time.

Predictive formula

I would like to predict how much we should keep in a box "Magical-box"
"Magical-box" Should have the ability to predict the value of the next deposit in it :
For Example :
DepositNbr Coins MagicBox
1 6 6
2 4 4
3 10 13 <==> the prediction process may starts from the third deposit
4 13 8
5 8 23
6 23 2
7 2 ...
is there any way to perform this prediction based on the past or the present ?,any formula ( markov Chain , normal distribution,Regression... ) is welcomed

Table transformation in Excel

I have a spreadsheet with data in following format:
CarID Day DistanceTraveled
Ford1 1 10
Ford1 2 12
Nissan1 1 13
Ford1 3 41
Nissan1 2 20
Nissan1 3 10
...
And so on. There are a few hundreds of records in format like this, with a few dozens of cars.
I have to transform it into a following format:
Day Ford1 Nissan1
1 10 13
2 12 20
3 41 10
Is it any fast and automatic way to achieve it in Excel?
Just for the sake of an answer:

Resources