Math Mad Minute

SGP

New Member
Joined
Feb 15, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. MacOS
I want to create a subtraction math mad minute sheet (about 60 questions) for my students. The first version has to have no negative numbers. Easy enough to do with RANDBETWEEN if the target definition cells contain a min (eg 0) and a max (eg 9). The problem is that RANDBETWEEN is a uniform distribution so I'm going to see as many 1s (for example) as I will 9s. 1s can only have 2 possible outcomes ( 1-1=0 and 1-0=1) but a 9 can have 10 outcomes. The result is a "boring" sheet with way too many low numbers and not enough high numbers. So in 55 "random" rolls, how can I get 10 9s, 9 8s, .......2 1s, and 1 0? I'd prefer to just specify a max value in a cell as opposed to something like using macros.

SGP
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
This will approximate the proportions you want but you cannot get the exact proportions with a formula that generates random numbers.

Excel Formula:
=LOOKUP(RANDBETWEEN(0,54),{0,10,19,27,34,40,45,49,52,54},{9,8,7,6,5,4,3,2,1,0})

To get the exact proportions you can use a shuffle approach. Create a list of 55 numbers 0-9 using the proportions you want, then have a formula in an adjacent column that assigns a random number to each, then use the LARGE function to select numbers in that random order. Click on the cell to see the formula.

Cell Formulas
RangeFormula
T2:T56T2=RAND()
U2:U56U2=INDEX($S$2:$S$56,MATCH(LARGE($T$2:$T$56,ROW()-1),$T$2:$T$56,0))
 
Upvote 0
Solution
Something like this? The left side generates the numbers and the right side makes sure that the higher numbers are on top to avoid negative answers.

TCOs working ELC Zones 2021 JJ.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBH
1
239997988717999799985
3-7-6-6-9-1-5-9-9-8-5-3-6-6-9-1-5-8-8-7-1
4
5
688497455978849997698
7-7-6-3-9-9-9-7-6-9-8-7-6-3-9-7-4-5-5-9-7
8
9
1047695865419979789684
11-9-9-7-9-7-6-9-6-8-4-4-7-6-9-5-6-6-5-4-1
12
13
1489548857788996888779
15-2-5-9-6-6-2-8-7-4-9-2-5-5-4-6-2-5-7-4-8
16
17
1897788226999779979799
19-6-7-6-9-9-7-9-7-3-7-6-7-6-8-8-2-2-6-3-7
20
21
2267459876697846989769
23-7-8-1-6-6-7-9-7-5-9-6-7-1-5-6-7-7-6-5-9
24
25
2647596967974759697797
27-2-5-3-8-1-7-7-4-2-6-2-5-3-8-1-7-6-4-2-6
28
29
3067895678956889969897
31-6-8-8-8-9-6-9-7-5-7-6-7-8-8-5-6-7-7-5-5
32
33
3489786984328999699756
35-5-7-9-9-5-6-9-7-5-6-5-7-7-8-5-6-8-4-3-2
36
37
3857398768835859998888
39-4-8-5-8-9-9-8-8-6-8-4-7-3-8-8-7-6-8-6-3
Sheet5
Cell Formulas
RangeFormula
B2:B3,AC38:AC39,Z38:Z39,W38:W39,T38:T39,Q38:Q39,N38:N39,K38:K39,H38:H39,E38:E39,B38:B39,AC34:AC35,Z34:Z35,W34:W35,T34:T35,Q34:Q35,N34:N35,K34:K35,H34:H35,E34:E35,B34:B35,AC30:AC31,Z30:Z31,W30:W31,T30:T31,Q30:Q31,N30:N31,K30:K31,H30:H31,E30:E31,B30:B31B2=MID(CONCAT(REPT({9;8;7;6;5;4;3;2;1},{8;7;6;5;4;3;2;1;1})),RANDBETWEEN(1,37),1)
AF2,BG38,BD38,BA38,AX38,AU38,AR38,AO38,AL38,AI38,AF38,BG34,BD34,BA34,AX34,AU34,AR34,AO34,AL34,AI34,AF34,BG30,BD30,BA30,AX30,AU30,AR30,AO30,AL30,AI30,AF30,BG26,BD26,BA26,AX26,AU26,AR26,AO26,AL26,AI26,AF26,BG22,BD22,BA22,AX22,AU22,AR22,AO22,AL22,AI22,AF22AF2=IF(B2<>"",MAX(INT(B2:B3)),"")
AF3,BG39,BD39,BA39,AX39,AU39,AR39,AO39,AL39,AI39,AF39,BG35,BD35,BA35,AX35,AU35,AR35,AO35,AL35,AI35,AF35,BG31,BD31,BA31,AX31,AU31,AR31,AO31,AL31,AI31,AF31,BG27,BD27,BA27,AX27,AU27,AR27,AO27,AL27,AI27,AF27,BG23,BD23,BA23,AX23,AU23,AR23,AO23,AL23,AI23,AF23AF3=IF(B2<>"",MIN(INT(B2:B3)),"")
 
Upvote 0
Here is a distribution of the numbers generated by that formula. It's not exact, but you get a definite bigger proportion of larger numbers.

TCOs working ELC Zones 2021 JJ.xlsx
AB
1ValueCount
2946
3834
4738
5630
6521
7412
837
927
1015
Table4
 
Upvote 0
Thanks Irobbo3114 for directing me to the Lookup function.
Here's the result.
Row 1 is the target max
Row 2 contains the cumulative requirement for the sum of the prior entries (e.g. k2=k1+j2).
Column AI is 1500 input points
Column AJ is the lookup for those inputs.
Since max is actually 1 less than the cumulative (e.g. 54 vs 55) for the target (i.e. 9) the Lookup function doesn't get an mistake at the top end.

So input 9 as a target, the max is found from Row2, AJ is the result. So in the first case, a RANDBETWEEN of 27 results in a "6".
The left graph (1500 points in AI) was just to prove to myself that I was getting a roughly uniform distribution on 0-max
Row 8 are the bins from 0-target
The right graph was to prove to myself that each number between 0-target was chosen with increasing frequency.

After that it was trivial to implement a worksheet where the higher numbers were seen more often in the minuend.

I'm happy!

Thanks

Screen Shot 2021-02-16 at 4.23.13 AM.png
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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