repeat a formula each 16 times and do median of them

dylan nico

New Member
Joined
Aug 27, 2022
Messages
1
Office Version
  1. 365
Platform
  1. MacOS
I have a following structure:
predictions, truth
1,1
1,0
1,1
1,2
1,0
... 16 times
0,0
0,0
0,1
0,0
... 16 times
.
.
.

I need to compute this formula for each 16 times and then do the median between all of them:
the formula is: equal_values/16, where equal_values are the values of the predictions which are equal to the values of truth.
Then, I need to do the median of all of them.
In the example above, the first 16 pairs returns 2/16. The second 16 pairs returns 3/16. Then the median of these two values.

Below an image that give. the idea. Thanks to all for the responses.


Schermata 2022-08-27 alle 12.09.45.png
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I'm not sure I follow completely, but have a look at this to see if it does what you want. I've introduced helper column to identify the groups of 16 (called "Series"), and then tabulated intermediate results in case you want to confirm the answers.
MrExcel_20220826.xlsx
ABCDEFG
1PredictionTruthSeries
2021Median6
3101
4111SeriesCount Pred=Truth
5001144/16
6221288/16
7011
8011
9121
10211
11211
12111
13101
14211
15021
16211
17021
18112
19112
20222
21202
22102
23102
24012
25212
26022
27202
28222
29002
30222
31002
32222
33122
Sheet6
Cell Formulas
RangeFormula
C2:C33C2=INT(SEQUENCE(COUNT(A2:A33),,0)/16)+1
F2F2=MEDIAN(F5:F6)
E5:E6E5=UNIQUE(C2#)
F5:F6F5=SUMPRODUCT((C$2#=E5)*($A$2:$A$33=$B$2:$B$33))
G5:G6G5=F5&"/16"
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top