AndyStanton
New Member
- Joined
- Mar 6, 2018
- Messages
- 4
Hi All,
I'm trying to generate a list of 7 random numbers from a list of 45 numbers which each have a previous frequency of selection. I'm trying to weight the random numbers to the previous frequency. Any assistance would be great!
Kind Regards,
Andy
[TABLE="width: 336"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD]Number[/TD]
[TD]Frequency[/TD]
[TD]Frequency % of total [/TD]
[TD]Cumulative[/TD]
[/TR]
[TR]
[TD="align: right"]33[/TD]
[TD="align: right"]149[/TD]
[TD="align: right"]0.025627795[/TD]
[TD="align: right"]0.025628[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD="align: right"]144[/TD]
[TD="align: right"]0.024767802[/TD]
[TD="align: right"]0.050396[/TD]
[/TR]
[TR]
[TD="align: right"]40[/TD]
[TD="align: right"]144[/TD]
[TD="align: right"]0.024767802[/TD]
[TD="align: right"]0.075163[/TD]
[/TR]
[TR]
[TD="align: right"]25[/TD]
[TD="align: right"]143[/TD]
[TD="align: right"]0.024595803[/TD]
[TD="align: right"]0.099759[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]141[/TD]
[TD="align: right"]0.024251806[/TD]
[TD="align: right"]0.124011[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]140[/TD]
[TD="align: right"]0.024079807[/TD]
[TD="align: right"]0.148091[/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD="align: right"]139[/TD]
[TD="align: right"]0.023907809[/TD]
[TD="align: right"]0.171999[/TD]
[/TR]
[TR]
[TD="align: right"]35[/TD]
[TD="align: right"]139[/TD]
[TD="align: right"]0.023907809[/TD]
[TD="align: right"]0.195906[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]138[/TD]
[TD="align: right"]0.02373581[/TD]
[TD="align: right"]0.219642[/TD]
[/TR]
[TR]
[TD="align: right"]21[/TD]
[TD="align: right"]138[/TD]
[TD="align: right"]0.02373581[/TD]
[TD="align: right"]0.243378[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="align: right"]137[/TD]
[TD="align: right"]0.023563811[/TD]
[TD="align: right"]0.266942[/TD]
[/TR]
[TR]
[TD="align: right"]27[/TD]
[TD="align: right"]136[/TD]
[TD="align: right"]0.023391813[/TD]
[TD="align: right"]0.290334[/TD]
[/TR]
[TR]
[TD="align: right"]37[/TD]
[TD="align: right"]136[/TD]
[TD="align: right"]0.023391813[/TD]
[TD="align: right"]0.313725[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]135[/TD]
[TD="align: right"]0.023219814[/TD]
[TD="align: right"]0.336945[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]135[/TD]
[TD="align: right"]0.023219814[/TD]
[TD="align: right"]0.360165[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]134[/TD]
[TD="align: right"]0.023047816[/TD]
[TD="align: right"]0.383213[/TD]
[/TR]
[TR]
[TD="align: right"]45[/TD]
[TD="align: right"]134[/TD]
[TD="align: right"]0.023047816[/TD]
[TD="align: right"]0.406261[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.429137[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.452012[/TD]
[/TR]
[TR]
[TD="align: right"]26[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.474888[/TD]
[/TR]
[TR]
[TD="align: right"]43[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.497764[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]131[/TD]
[TD="align: right"]0.02253182[/TD]
[TD="align: right"]0.520296[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD="align: right"]131[/TD]
[TD="align: right"]0.02253182[/TD]
[TD="align: right"]0.542828[/TD]
[/TR]
[TR]
[TD="align: right"]41[/TD]
[TD="align: right"]131[/TD]
[TD="align: right"]0.02253182[/TD]
[TD="align: right"]0.565359[/TD]
[/TR]
[TR]
[TD="align: right"]22[/TD]
[TD="align: right"]130[/TD]
[TD="align: right"]0.022359821[/TD]
[TD="align: right"]0.587719[/TD]
[/TR]
[TR]
[TD="align: right"]44[/TD]
[TD="align: right"]130[/TD]
[TD="align: right"]0.022359821[/TD]
[TD="align: right"]0.610079[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]129[/TD]
[TD="align: right"]0.022187822[/TD]
[TD="align: right"]0.632267[/TD]
[/TR]
[TR]
[TD="align: right"]23[/TD]
[TD="align: right"]129[/TD]
[TD="align: right"]0.022187822[/TD]
[TD="align: right"]0.654455[/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD="align: right"]129[/TD]
[TD="align: right"]0.022187822[/TD]
[TD="align: right"]0.676643[/TD]
[/TR]
[TR]
[TD="align: right"]34[/TD]
[TD="align: right"]128[/TD]
[TD="align: right"]0.022015824[/TD]
[TD="align: right"]0.698658[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]125[/TD]
[TD="align: right"]0.021499828[/TD]
[TD="align: right"]0.720158[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]125[/TD]
[TD="align: right"]0.021499828[/TD]
[TD="align: right"]0.741658[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD="align: right"]125[/TD]
[TD="align: right"]0.021499828[/TD]
[TD="align: right"]0.763158[/TD]
[/TR]
[TR]
[TD="align: right"]31[/TD]
[TD="align: right"]124[/TD]
[TD="align: right"]0.021327829[/TD]
[TD="align: right"]0.784486[/TD]
[/TR]
[TR]
[TD="align: right"]39[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]0.021155831[/TD]
[TD="align: right"]0.805642[/TD]
[/TR]
[TR]
[TD="align: right"]36[/TD]
[TD="align: right"]122[/TD]
[TD="align: right"]0.020983832[/TD]
[TD="align: right"]0.826625[/TD]
[/TR]
[TR]
[TD="align: right"]32[/TD]
[TD="align: right"]118[/TD]
[TD="align: right"]0.020295838[/TD]
[TD="align: right"]0.846921[/TD]
[/TR]
[TR]
[TD="align: right"]38[/TD]
[TD="align: right"]116[/TD]
[TD="align: right"]0.01995184[/TD]
[TD="align: right"]0.866873[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]115[/TD]
[TD="align: right"]0.019779842[/TD]
[TD="align: right"]0.886653[/TD]
[/TR]
[TR]
[TD="align: right"]18[/TD]
[TD="align: right"]113[/TD]
[TD="align: right"]0.019435845[/TD]
[TD="align: right"]0.906089[/TD]
[/TR]
[TR]
[TD="align: right"]30[/TD]
[TD="align: right"]113[/TD]
[TD="align: right"]0.019435845[/TD]
[TD="align: right"]0.925525[/TD]
[/TR]
[TR]
[TD="align: right"]42[/TD]
[TD="align: right"]111[/TD]
[TD="align: right"]0.019091847[/TD]
[TD="align: right"]0.944616[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]110[/TD]
[TD="align: right"]0.018919849[/TD]
[TD="align: right"]0.963536[/TD]
[/TR]
[TR]
[TD="align: right"]24[/TD]
[TD="align: right"]110[/TD]
[TD="align: right"]0.018919849[/TD]
[TD="align: right"]0.982456[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]102[/TD]
[TD="align: right"]0.01754386[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to generate a list of 7 random numbers from a list of 45 numbers which each have a previous frequency of selection. I'm trying to weight the random numbers to the previous frequency. Any assistance would be great!
Kind Regards,
Andy
[TABLE="width: 336"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD]Number[/TD]
[TD]Frequency[/TD]
[TD]Frequency % of total [/TD]
[TD]Cumulative[/TD]
[/TR]
[TR]
[TD="align: right"]33[/TD]
[TD="align: right"]149[/TD]
[TD="align: right"]0.025627795[/TD]
[TD="align: right"]0.025628[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD="align: right"]144[/TD]
[TD="align: right"]0.024767802[/TD]
[TD="align: right"]0.050396[/TD]
[/TR]
[TR]
[TD="align: right"]40[/TD]
[TD="align: right"]144[/TD]
[TD="align: right"]0.024767802[/TD]
[TD="align: right"]0.075163[/TD]
[/TR]
[TR]
[TD="align: right"]25[/TD]
[TD="align: right"]143[/TD]
[TD="align: right"]0.024595803[/TD]
[TD="align: right"]0.099759[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]141[/TD]
[TD="align: right"]0.024251806[/TD]
[TD="align: right"]0.124011[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]140[/TD]
[TD="align: right"]0.024079807[/TD]
[TD="align: right"]0.148091[/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD="align: right"]139[/TD]
[TD="align: right"]0.023907809[/TD]
[TD="align: right"]0.171999[/TD]
[/TR]
[TR]
[TD="align: right"]35[/TD]
[TD="align: right"]139[/TD]
[TD="align: right"]0.023907809[/TD]
[TD="align: right"]0.195906[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]138[/TD]
[TD="align: right"]0.02373581[/TD]
[TD="align: right"]0.219642[/TD]
[/TR]
[TR]
[TD="align: right"]21[/TD]
[TD="align: right"]138[/TD]
[TD="align: right"]0.02373581[/TD]
[TD="align: right"]0.243378[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="align: right"]137[/TD]
[TD="align: right"]0.023563811[/TD]
[TD="align: right"]0.266942[/TD]
[/TR]
[TR]
[TD="align: right"]27[/TD]
[TD="align: right"]136[/TD]
[TD="align: right"]0.023391813[/TD]
[TD="align: right"]0.290334[/TD]
[/TR]
[TR]
[TD="align: right"]37[/TD]
[TD="align: right"]136[/TD]
[TD="align: right"]0.023391813[/TD]
[TD="align: right"]0.313725[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]135[/TD]
[TD="align: right"]0.023219814[/TD]
[TD="align: right"]0.336945[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]135[/TD]
[TD="align: right"]0.023219814[/TD]
[TD="align: right"]0.360165[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]134[/TD]
[TD="align: right"]0.023047816[/TD]
[TD="align: right"]0.383213[/TD]
[/TR]
[TR]
[TD="align: right"]45[/TD]
[TD="align: right"]134[/TD]
[TD="align: right"]0.023047816[/TD]
[TD="align: right"]0.406261[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.429137[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.452012[/TD]
[/TR]
[TR]
[TD="align: right"]26[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.474888[/TD]
[/TR]
[TR]
[TD="align: right"]43[/TD]
[TD="align: right"]133[/TD]
[TD="align: right"]0.022875817[/TD]
[TD="align: right"]0.497764[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]131[/TD]
[TD="align: right"]0.02253182[/TD]
[TD="align: right"]0.520296[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD="align: right"]131[/TD]
[TD="align: right"]0.02253182[/TD]
[TD="align: right"]0.542828[/TD]
[/TR]
[TR]
[TD="align: right"]41[/TD]
[TD="align: right"]131[/TD]
[TD="align: right"]0.02253182[/TD]
[TD="align: right"]0.565359[/TD]
[/TR]
[TR]
[TD="align: right"]22[/TD]
[TD="align: right"]130[/TD]
[TD="align: right"]0.022359821[/TD]
[TD="align: right"]0.587719[/TD]
[/TR]
[TR]
[TD="align: right"]44[/TD]
[TD="align: right"]130[/TD]
[TD="align: right"]0.022359821[/TD]
[TD="align: right"]0.610079[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]129[/TD]
[TD="align: right"]0.022187822[/TD]
[TD="align: right"]0.632267[/TD]
[/TR]
[TR]
[TD="align: right"]23[/TD]
[TD="align: right"]129[/TD]
[TD="align: right"]0.022187822[/TD]
[TD="align: right"]0.654455[/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD="align: right"]129[/TD]
[TD="align: right"]0.022187822[/TD]
[TD="align: right"]0.676643[/TD]
[/TR]
[TR]
[TD="align: right"]34[/TD]
[TD="align: right"]128[/TD]
[TD="align: right"]0.022015824[/TD]
[TD="align: right"]0.698658[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]125[/TD]
[TD="align: right"]0.021499828[/TD]
[TD="align: right"]0.720158[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]125[/TD]
[TD="align: right"]0.021499828[/TD]
[TD="align: right"]0.741658[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD="align: right"]125[/TD]
[TD="align: right"]0.021499828[/TD]
[TD="align: right"]0.763158[/TD]
[/TR]
[TR]
[TD="align: right"]31[/TD]
[TD="align: right"]124[/TD]
[TD="align: right"]0.021327829[/TD]
[TD="align: right"]0.784486[/TD]
[/TR]
[TR]
[TD="align: right"]39[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]0.021155831[/TD]
[TD="align: right"]0.805642[/TD]
[/TR]
[TR]
[TD="align: right"]36[/TD]
[TD="align: right"]122[/TD]
[TD="align: right"]0.020983832[/TD]
[TD="align: right"]0.826625[/TD]
[/TR]
[TR]
[TD="align: right"]32[/TD]
[TD="align: right"]118[/TD]
[TD="align: right"]0.020295838[/TD]
[TD="align: right"]0.846921[/TD]
[/TR]
[TR]
[TD="align: right"]38[/TD]
[TD="align: right"]116[/TD]
[TD="align: right"]0.01995184[/TD]
[TD="align: right"]0.866873[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]115[/TD]
[TD="align: right"]0.019779842[/TD]
[TD="align: right"]0.886653[/TD]
[/TR]
[TR]
[TD="align: right"]18[/TD]
[TD="align: right"]113[/TD]
[TD="align: right"]0.019435845[/TD]
[TD="align: right"]0.906089[/TD]
[/TR]
[TR]
[TD="align: right"]30[/TD]
[TD="align: right"]113[/TD]
[TD="align: right"]0.019435845[/TD]
[TD="align: right"]0.925525[/TD]
[/TR]
[TR]
[TD="align: right"]42[/TD]
[TD="align: right"]111[/TD]
[TD="align: right"]0.019091847[/TD]
[TD="align: right"]0.944616[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]110[/TD]
[TD="align: right"]0.018919849[/TD]
[TD="align: right"]0.963536[/TD]
[/TR]
[TR]
[TD="align: right"]24[/TD]
[TD="align: right"]110[/TD]
[TD="align: right"]0.018919849[/TD]
[TD="align: right"]0.982456[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]102[/TD]
[TD="align: right"]0.01754386[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]