Post History
#6: Post edited
Expected value of highest dice rolled
- Expected value of highest dice rolled [FINALIZED]
- You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - The expected value (the mean value) of the highest individual dice result when $N$ dice are rolled simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct result when rounded to 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 3.500000
- 2 : 4.472222
- 3 : 4.958333
- 4 : 5.244599
- 5 : 5.430941
- 6 : 5.560292
- 7 : 5.654117
- 8 : 5.724354
- 9 : 5.778177
- 10 : 5.820159
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- ## Now posted: [Expected value of highest dice rolled](https://codegolf.codidact.com/posts/288885)
- ---
- You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - The expected value (the mean value) of the highest individual dice result when $N$ dice are rolled simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct result when rounded to 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 3.500000
- 2 : 4.472222
- 3 : 4.958333
- 4 : 5.244599
- 5 : 5.430941
- 6 : 5.560292
- 7 : 5.654117
- 8 : 5.724354
- 9 : 5.778177
- 10 : 5.820159
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#5: Post edited
- You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer $N$.
- Your code must work for inputs up to and including 10, but may crash or error for larger inputs.- ## Output
- - The expected value (the mean value) of the highest individual dice result when $N$ dice are rolled simultaneously.
- For inputs up to and including 10, the output must be correct to 6 decimal places.- If you provide more than 6 decimal places, the rest do not need to be correct.*Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*- ## Test cases
- - Test cases are in the format `input : output`.
- Outputs are shown to 29 decimal places, but only the first 6 are required.- Inputs are listed up to 100, but only the first 10 are required.- ```text
1 : 3.500000000000000000000000000002 : 4.472222222222222222222222222223 : 4.958333333333333333333333333334 : 5.244598765432098765432098765435 : 5.430941358024691358024691358026 : 5.560292352537722908093278463657 : 5.654117369684499314128943758578 : 5.724354257163542142966011278779 : 5.7781769761659807956104252400510 : 5.8201593730683415468509204220211 : 5.8533570652789420650646073599912 : 5.8798899758253091594363250106813 : 5.9012751923121081408848771547514 : 5.9186267025423998213766386526915 : 5.9327802829486331639667746121716 : 5.9443743862072670676312953081817 : 5.9539041595246575068146595881318 : 5.9617585064783429616075445225119 : 5.9682461348357347805235116579020 : 5.9736142640744755766398476500621 : 5.9780623262068708507459529301222 : 5.9817521784614470866215435302223 : 5.9848158377370226197559321724524 : 5.9873614219872756474270721211425 : 5.9894777720580589093966441672226 : 5.9912380870044203991276319253427 : 5.9927028110407165882450996182928 : 5.9939219451751556923372990584329 : 5.9949369112150591001072593805230 : 5.9957820637405342968774934371831 : 5.9964859226100636751648256975632 : 5.9970721817852799508473669416733 : 5.9975605378686808764992865027434 : 5.9979673724649306607985895871235 : 5.9983063154305501786156995083036 : 5.9985887106620744652132230099737 : 5.9988240018634113824545068183838 : 5.9990200524264894854957609571139 : 5.9991834109374347955313239403840 : 5.9993195317245670357422346669141 : 5.9994329581770635010879598358742 : 5.9995274751963408153891132261743 : 5.9996062360294506809551844250144 : 5.9996718678239740476775548020745 : 5.9997265594973710439386263671246 : 5.9997721348994011592303031494347 : 5.9998101137394495798956375274948 : 5.9998417623317284918902293365349 : 5.9998681358645647987029081322950 : 5.9998901136125533940756949886751 : 5.9999084282718495487032128574752 : 5.9999236904008001658917429658953 : 5.9999364087835060304419844589654 : 5.9999470073970367189428636302055 : 5.9999558395491628331119539338156 : 5.9999631996587238471712760348957 : 5.9999693330718841952638521095058 : 5.9999744442418685992518588219059 : 5.9999787035450894566790429550260 : 5.9999822529610405185747847007861 : 5.9999852108053999684996685497062 : 5.9999876756741885534931023386763 : 5.9999897297305050699379664876764 : 5.9999914414434306307320684081165 : 5.9999928678704209072376534402766 : 5.9999940565592810104467638165467 : 5.9999950471331321227588324216468 : 5.9999958726112087338892935939869 : 5.9999965605095174770786570309870 : 5.9999971337580491412348564313771 : 5.9999976114651195579196032928672 : 5.9999980095543187028599931978173 : 5.9999983412953005221124088830974 : 5.9999986177461070593574942281875 : 5.9999988481217714100848971917176 : 5.9999990401014865265954016086077 : 5.9999992000845790065126025025278 : 5.9999993334038204394381243470679 : 5.9999994445031867666501847626780 : 5.9999995370859910169540967673781 : 5.9999996142383272106254868576782 : 5.9999996785319402509637320364583 : 5.9999997321099508149869942218984 : 5.9999997767582927497228624122085 : 5.9999998139652442273692968226286 : 5.9999998449710370356523550020687 : 5.9999998708091976493844787113088 : 5.9999998923409981209365208428789 : 5.9999999102841651539689597576790 : 5.9999999252368043304331502791891 : 5.9999999376973369656669699977492 : 5.9999999480811141538153715081493 : 5.9999999567342618053525183745594 : 5.9999999639452181781313489461995 : 5.9999999699543484864456243223096 : 5.9999999749619570751510204022397 : 5.9999999791349642313678504242998 : 5.9999999826124701941900976351999 : 5.99999998551039182941411843930100 : 5.99999998792532652512667897273- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs.
- ## Output
- - The expected value (the mean value) of the highest individual dice result when $N$ dice are rolled simultaneously.
- - For inputs up to and including 10, your output is valid if rounding it to 6 decimal places results in the output shown in the test cases.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct result when rounded to 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- ```text
- 1 : 3.500000
- 2 : 4.472222
- 3 : 4.958333
- 4 : 5.244599
- 5 : 5.430941
- 6 : 5.560292
- 7 : 5.654117
- 8 : 5.724354
- 9 : 5.778177
- 10 : 5.820159
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#4: Post edited
- You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash or error for larger inputs.
- ## Output
- - The expected value (the mean value) of the highest individual dice result when $N$ dice are rolled simultaneously.
- - For inputs up to and including 10, the output must be correct to 6 decimal places.
- If you provide more than 6 decimal places, they do not need to be correct.- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- - Outputs are shown to 29 decimal places, but only the first 6 are required.
- - Inputs are listed up to 100, but only the first 10 are required.
- ```text
- 1 : 3.50000000000000000000000000000
- 2 : 4.47222222222222222222222222222
- 3 : 4.95833333333333333333333333333
- 4 : 5.24459876543209876543209876543
- 5 : 5.43094135802469135802469135802
- 6 : 5.56029235253772290809327846365
- 7 : 5.65411736968449931412894375857
- 8 : 5.72435425716354214296601127877
- 9 : 5.77817697616598079561042524005
- 10 : 5.82015937306834154685092042202
- 11 : 5.85335706527894206506460735999
- 12 : 5.87988997582530915943632501068
- 13 : 5.90127519231210814088487715475
- 14 : 5.91862670254239982137663865269
- 15 : 5.93278028294863316396677461217
- 16 : 5.94437438620726706763129530818
- 17 : 5.95390415952465750681465958813
- 18 : 5.96175850647834296160754452251
- 19 : 5.96824613483573478052351165790
- 20 : 5.97361426407447557663984765006
- 21 : 5.97806232620687085074595293012
- 22 : 5.98175217846144708662154353022
- 23 : 5.98481583773702261975593217245
- 24 : 5.98736142198727564742707212114
- 25 : 5.98947777205805890939664416722
- 26 : 5.99123808700442039912763192534
- 27 : 5.99270281104071658824509961829
- 28 : 5.99392194517515569233729905843
- 29 : 5.99493691121505910010725938052
- 30 : 5.99578206374053429687749343718
- 31 : 5.99648592261006367516482569756
- 32 : 5.99707218178527995084736694167
- 33 : 5.99756053786868087649928650274
- 34 : 5.99796737246493066079858958712
- 35 : 5.99830631543055017861569950830
- 36 : 5.99858871066207446521322300997
- 37 : 5.99882400186341138245450681838
- 38 : 5.99902005242648948549576095711
- 39 : 5.99918341093743479553132394038
- 40 : 5.99931953172456703574223466691
- 41 : 5.99943295817706350108795983587
- 42 : 5.99952747519634081538911322617
- 43 : 5.99960623602945068095518442501
- 44 : 5.99967186782397404767755480207
- 45 : 5.99972655949737104393862636712
- 46 : 5.99977213489940115923030314943
- 47 : 5.99981011373944957989563752749
- 48 : 5.99984176233172849189022933653
- 49 : 5.99986813586456479870290813229
- 50 : 5.99989011361255339407569498867
- 51 : 5.99990842827184954870321285747
- 52 : 5.99992369040080016589174296589
- 53 : 5.99993640878350603044198445896
- 54 : 5.99994700739703671894286363020
- 55 : 5.99995583954916283311195393381
- 56 : 5.99996319965872384717127603489
- 57 : 5.99996933307188419526385210950
- 58 : 5.99997444424186859925185882190
- 59 : 5.99997870354508945667904295502
- 60 : 5.99998225296104051857478470078
- 61 : 5.99998521080539996849966854970
- 62 : 5.99998767567418855349310233867
- 63 : 5.99998972973050506993796648767
- 64 : 5.99999144144343063073206840811
- 65 : 5.99999286787042090723765344027
- 66 : 5.99999405655928101044676381654
- 67 : 5.99999504713313212275883242164
- 68 : 5.99999587261120873388929359398
- 69 : 5.99999656050951747707865703098
- 70 : 5.99999713375804914123485643137
- 71 : 5.99999761146511955791960329286
- 72 : 5.99999800955431870285999319781
- 73 : 5.99999834129530052211240888309
- 74 : 5.99999861774610705935749422818
- 75 : 5.99999884812177141008489719171
- 76 : 5.99999904010148652659540160860
- 77 : 5.99999920008457900651260250252
- 78 : 5.99999933340382043943812434706
- 79 : 5.99999944450318676665018476267
- 80 : 5.99999953708599101695409676737
- 81 : 5.99999961423832721062548685767
- 82 : 5.99999967853194025096373203645
- 83 : 5.99999973210995081498699422189
- 84 : 5.99999977675829274972286241220
- 85 : 5.99999981396524422736929682262
- 86 : 5.99999984497103703565235500206
- 87 : 5.99999987080919764938447871130
- 88 : 5.99999989234099812093652084287
- 89 : 5.99999991028416515396895975767
- 90 : 5.99999992523680433043315027918
- 91 : 5.99999993769733696566696999774
- 92 : 5.99999994808111415381537150814
- 93 : 5.99999995673426180535251837455
- 94 : 5.99999996394521817813134894619
- 95 : 5.99999996995434848644562432230
- 96 : 5.99999997496195707515102040223
- 97 : 5.99999997913496423136785042429
- 98 : 5.99999998261247019419009763519
- 99 : 5.99999998551039182941411843930
- 100 : 5.99999998792532652512667897273
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash or error for larger inputs.
- ## Output
- - The expected value (the mean value) of the highest individual dice result when $N$ dice are rolled simultaneously.
- - For inputs up to and including 10, the output must be correct to 6 decimal places.
- - If you provide more than 6 decimal places, the rest do not need to be correct.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- - Outputs are shown to 29 decimal places, but only the first 6 are required.
- - Inputs are listed up to 100, but only the first 10 are required.
- ```text
- 1 : 3.50000000000000000000000000000
- 2 : 4.47222222222222222222222222222
- 3 : 4.95833333333333333333333333333
- 4 : 5.24459876543209876543209876543
- 5 : 5.43094135802469135802469135802
- 6 : 5.56029235253772290809327846365
- 7 : 5.65411736968449931412894375857
- 8 : 5.72435425716354214296601127877
- 9 : 5.77817697616598079561042524005
- 10 : 5.82015937306834154685092042202
- 11 : 5.85335706527894206506460735999
- 12 : 5.87988997582530915943632501068
- 13 : 5.90127519231210814088487715475
- 14 : 5.91862670254239982137663865269
- 15 : 5.93278028294863316396677461217
- 16 : 5.94437438620726706763129530818
- 17 : 5.95390415952465750681465958813
- 18 : 5.96175850647834296160754452251
- 19 : 5.96824613483573478052351165790
- 20 : 5.97361426407447557663984765006
- 21 : 5.97806232620687085074595293012
- 22 : 5.98175217846144708662154353022
- 23 : 5.98481583773702261975593217245
- 24 : 5.98736142198727564742707212114
- 25 : 5.98947777205805890939664416722
- 26 : 5.99123808700442039912763192534
- 27 : 5.99270281104071658824509961829
- 28 : 5.99392194517515569233729905843
- 29 : 5.99493691121505910010725938052
- 30 : 5.99578206374053429687749343718
- 31 : 5.99648592261006367516482569756
- 32 : 5.99707218178527995084736694167
- 33 : 5.99756053786868087649928650274
- 34 : 5.99796737246493066079858958712
- 35 : 5.99830631543055017861569950830
- 36 : 5.99858871066207446521322300997
- 37 : 5.99882400186341138245450681838
- 38 : 5.99902005242648948549576095711
- 39 : 5.99918341093743479553132394038
- 40 : 5.99931953172456703574223466691
- 41 : 5.99943295817706350108795983587
- 42 : 5.99952747519634081538911322617
- 43 : 5.99960623602945068095518442501
- 44 : 5.99967186782397404767755480207
- 45 : 5.99972655949737104393862636712
- 46 : 5.99977213489940115923030314943
- 47 : 5.99981011373944957989563752749
- 48 : 5.99984176233172849189022933653
- 49 : 5.99986813586456479870290813229
- 50 : 5.99989011361255339407569498867
- 51 : 5.99990842827184954870321285747
- 52 : 5.99992369040080016589174296589
- 53 : 5.99993640878350603044198445896
- 54 : 5.99994700739703671894286363020
- 55 : 5.99995583954916283311195393381
- 56 : 5.99996319965872384717127603489
- 57 : 5.99996933307188419526385210950
- 58 : 5.99997444424186859925185882190
- 59 : 5.99997870354508945667904295502
- 60 : 5.99998225296104051857478470078
- 61 : 5.99998521080539996849966854970
- 62 : 5.99998767567418855349310233867
- 63 : 5.99998972973050506993796648767
- 64 : 5.99999144144343063073206840811
- 65 : 5.99999286787042090723765344027
- 66 : 5.99999405655928101044676381654
- 67 : 5.99999504713313212275883242164
- 68 : 5.99999587261120873388929359398
- 69 : 5.99999656050951747707865703098
- 70 : 5.99999713375804914123485643137
- 71 : 5.99999761146511955791960329286
- 72 : 5.99999800955431870285999319781
- 73 : 5.99999834129530052211240888309
- 74 : 5.99999861774610705935749422818
- 75 : 5.99999884812177141008489719171
- 76 : 5.99999904010148652659540160860
- 77 : 5.99999920008457900651260250252
- 78 : 5.99999933340382043943812434706
- 79 : 5.99999944450318676665018476267
- 80 : 5.99999953708599101695409676737
- 81 : 5.99999961423832721062548685767
- 82 : 5.99999967853194025096373203645
- 83 : 5.99999973210995081498699422189
- 84 : 5.99999977675829274972286241220
- 85 : 5.99999981396524422736929682262
- 86 : 5.99999984497103703565235500206
- 87 : 5.99999987080919764938447871130
- 88 : 5.99999989234099812093652084287
- 89 : 5.99999991028416515396895975767
- 90 : 5.99999992523680433043315027918
- 91 : 5.99999993769733696566696999774
- 92 : 5.99999994808111415381537150814
- 93 : 5.99999995673426180535251837455
- 94 : 5.99999996394521817813134894619
- 95 : 5.99999996995434848644562432230
- 96 : 5.99999997496195707515102040223
- 97 : 5.99999997913496423136785042429
- 98 : 5.99999998261247019419009763519
- 99 : 5.99999998551039182941411843930
- 100 : 5.99999998792532652512667897273
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#3: Post edited
You roll N dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?- ## Input
- A positive integer.- - Your code must work for inputs up to and including 10, but may crash or error for larger inputs.
- ## Output
- The expected value (the mean value) of the highest individual dice result when N dice are rolled simultaneously.- - For inputs up to and including 10, the output must be correct to 6 decimal places.
- - If you provide more than 6 decimal places, they do not need to be correct.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- - Outputs are shown to 29 decimal places, but only the first 6 are required.
- - Inputs are listed up to 100, but only the first 10 are required.
- ```text
- 1 : 3.50000000000000000000000000000
- 2 : 4.47222222222222222222222222222
- 3 : 4.95833333333333333333333333333
- 4 : 5.24459876543209876543209876543
- 5 : 5.43094135802469135802469135802
- 6 : 5.56029235253772290809327846365
- 7 : 5.65411736968449931412894375857
- 8 : 5.72435425716354214296601127877
- 9 : 5.77817697616598079561042524005
- 10 : 5.82015937306834154685092042202
- 11 : 5.85335706527894206506460735999
- 12 : 5.87988997582530915943632501068
- 13 : 5.90127519231210814088487715475
- 14 : 5.91862670254239982137663865269
- 15 : 5.93278028294863316396677461217
- 16 : 5.94437438620726706763129530818
- 17 : 5.95390415952465750681465958813
- 18 : 5.96175850647834296160754452251
- 19 : 5.96824613483573478052351165790
- 20 : 5.97361426407447557663984765006
- 21 : 5.97806232620687085074595293012
- 22 : 5.98175217846144708662154353022
- 23 : 5.98481583773702261975593217245
- 24 : 5.98736142198727564742707212114
- 25 : 5.98947777205805890939664416722
- 26 : 5.99123808700442039912763192534
- 27 : 5.99270281104071658824509961829
- 28 : 5.99392194517515569233729905843
- 29 : 5.99493691121505910010725938052
- 30 : 5.99578206374053429687749343718
- 31 : 5.99648592261006367516482569756
- 32 : 5.99707218178527995084736694167
- 33 : 5.99756053786868087649928650274
- 34 : 5.99796737246493066079858958712
- 35 : 5.99830631543055017861569950830
- 36 : 5.99858871066207446521322300997
- 37 : 5.99882400186341138245450681838
- 38 : 5.99902005242648948549576095711
- 39 : 5.99918341093743479553132394038
- 40 : 5.99931953172456703574223466691
- 41 : 5.99943295817706350108795983587
- 42 : 5.99952747519634081538911322617
- 43 : 5.99960623602945068095518442501
- 44 : 5.99967186782397404767755480207
- 45 : 5.99972655949737104393862636712
- 46 : 5.99977213489940115923030314943
- 47 : 5.99981011373944957989563752749
- 48 : 5.99984176233172849189022933653
- 49 : 5.99986813586456479870290813229
- 50 : 5.99989011361255339407569498867
- 51 : 5.99990842827184954870321285747
- 52 : 5.99992369040080016589174296589
- 53 : 5.99993640878350603044198445896
- 54 : 5.99994700739703671894286363020
- 55 : 5.99995583954916283311195393381
- 56 : 5.99996319965872384717127603489
- 57 : 5.99996933307188419526385210950
- 58 : 5.99997444424186859925185882190
- 59 : 5.99997870354508945667904295502
- 60 : 5.99998225296104051857478470078
- 61 : 5.99998521080539996849966854970
- 62 : 5.99998767567418855349310233867
- 63 : 5.99998972973050506993796648767
- 64 : 5.99999144144343063073206840811
- 65 : 5.99999286787042090723765344027
- 66 : 5.99999405655928101044676381654
- 67 : 5.99999504713313212275883242164
- 68 : 5.99999587261120873388929359398
- 69 : 5.99999656050951747707865703098
- 70 : 5.99999713375804914123485643137
- 71 : 5.99999761146511955791960329286
- 72 : 5.99999800955431870285999319781
- 73 : 5.99999834129530052211240888309
- 74 : 5.99999861774610705935749422818
- 75 : 5.99999884812177141008489719171
- 76 : 5.99999904010148652659540160860
- 77 : 5.99999920008457900651260250252
- 78 : 5.99999933340382043943812434706
- 79 : 5.99999944450318676665018476267
- 80 : 5.99999953708599101695409676737
- 81 : 5.99999961423832721062548685767
- 82 : 5.99999967853194025096373203645
- 83 : 5.99999973210995081498699422189
- 84 : 5.99999977675829274972286241220
- 85 : 5.99999981396524422736929682262
- 86 : 5.99999984497103703565235500206
- 87 : 5.99999987080919764938447871130
- 88 : 5.99999989234099812093652084287
- 89 : 5.99999991028416515396895975767
- 90 : 5.99999992523680433043315027918
- 91 : 5.99999993769733696566696999774
- 92 : 5.99999994808111415381537150814
- 93 : 5.99999995673426180535251837455
- 94 : 5.99999996394521817813134894619
- 95 : 5.99999996995434848644562432230
- 96 : 5.99999997496195707515102040223
- 97 : 5.99999997913496423136785042429
- 98 : 5.99999998261247019419009763519
- 99 : 5.99999998551039182941411843930
- 100 : 5.99999998792532652512667897273
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer $N$.
- - Your code must work for inputs up to and including 10, but may crash or error for larger inputs.
- ## Output
- - The expected value (the mean value) of the highest individual dice result when $N$ dice are rolled simultaneously.
- - For inputs up to and including 10, the output must be correct to 6 decimal places.
- - If you provide more than 6 decimal places, they do not need to be correct.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- - Outputs are shown to 29 decimal places, but only the first 6 are required.
- - Inputs are listed up to 100, but only the first 10 are required.
- ```text
- 1 : 3.50000000000000000000000000000
- 2 : 4.47222222222222222222222222222
- 3 : 4.95833333333333333333333333333
- 4 : 5.24459876543209876543209876543
- 5 : 5.43094135802469135802469135802
- 6 : 5.56029235253772290809327846365
- 7 : 5.65411736968449931412894375857
- 8 : 5.72435425716354214296601127877
- 9 : 5.77817697616598079561042524005
- 10 : 5.82015937306834154685092042202
- 11 : 5.85335706527894206506460735999
- 12 : 5.87988997582530915943632501068
- 13 : 5.90127519231210814088487715475
- 14 : 5.91862670254239982137663865269
- 15 : 5.93278028294863316396677461217
- 16 : 5.94437438620726706763129530818
- 17 : 5.95390415952465750681465958813
- 18 : 5.96175850647834296160754452251
- 19 : 5.96824613483573478052351165790
- 20 : 5.97361426407447557663984765006
- 21 : 5.97806232620687085074595293012
- 22 : 5.98175217846144708662154353022
- 23 : 5.98481583773702261975593217245
- 24 : 5.98736142198727564742707212114
- 25 : 5.98947777205805890939664416722
- 26 : 5.99123808700442039912763192534
- 27 : 5.99270281104071658824509961829
- 28 : 5.99392194517515569233729905843
- 29 : 5.99493691121505910010725938052
- 30 : 5.99578206374053429687749343718
- 31 : 5.99648592261006367516482569756
- 32 : 5.99707218178527995084736694167
- 33 : 5.99756053786868087649928650274
- 34 : 5.99796737246493066079858958712
- 35 : 5.99830631543055017861569950830
- 36 : 5.99858871066207446521322300997
- 37 : 5.99882400186341138245450681838
- 38 : 5.99902005242648948549576095711
- 39 : 5.99918341093743479553132394038
- 40 : 5.99931953172456703574223466691
- 41 : 5.99943295817706350108795983587
- 42 : 5.99952747519634081538911322617
- 43 : 5.99960623602945068095518442501
- 44 : 5.99967186782397404767755480207
- 45 : 5.99972655949737104393862636712
- 46 : 5.99977213489940115923030314943
- 47 : 5.99981011373944957989563752749
- 48 : 5.99984176233172849189022933653
- 49 : 5.99986813586456479870290813229
- 50 : 5.99989011361255339407569498867
- 51 : 5.99990842827184954870321285747
- 52 : 5.99992369040080016589174296589
- 53 : 5.99993640878350603044198445896
- 54 : 5.99994700739703671894286363020
- 55 : 5.99995583954916283311195393381
- 56 : 5.99996319965872384717127603489
- 57 : 5.99996933307188419526385210950
- 58 : 5.99997444424186859925185882190
- 59 : 5.99997870354508945667904295502
- 60 : 5.99998225296104051857478470078
- 61 : 5.99998521080539996849966854970
- 62 : 5.99998767567418855349310233867
- 63 : 5.99998972973050506993796648767
- 64 : 5.99999144144343063073206840811
- 65 : 5.99999286787042090723765344027
- 66 : 5.99999405655928101044676381654
- 67 : 5.99999504713313212275883242164
- 68 : 5.99999587261120873388929359398
- 69 : 5.99999656050951747707865703098
- 70 : 5.99999713375804914123485643137
- 71 : 5.99999761146511955791960329286
- 72 : 5.99999800955431870285999319781
- 73 : 5.99999834129530052211240888309
- 74 : 5.99999861774610705935749422818
- 75 : 5.99999884812177141008489719171
- 76 : 5.99999904010148652659540160860
- 77 : 5.99999920008457900651260250252
- 78 : 5.99999933340382043943812434706
- 79 : 5.99999944450318676665018476267
- 80 : 5.99999953708599101695409676737
- 81 : 5.99999961423832721062548685767
- 82 : 5.99999967853194025096373203645
- 83 : 5.99999973210995081498699422189
- 84 : 5.99999977675829274972286241220
- 85 : 5.99999981396524422736929682262
- 86 : 5.99999984497103703565235500206
- 87 : 5.99999987080919764938447871130
- 88 : 5.99999989234099812093652084287
- 89 : 5.99999991028416515396895975767
- 90 : 5.99999992523680433043315027918
- 91 : 5.99999993769733696566696999774
- 92 : 5.99999994808111415381537150814
- 93 : 5.99999995673426180535251837455
- 94 : 5.99999996394521817813134894619
- 95 : 5.99999996995434848644562432230
- 96 : 5.99999997496195707515102040223
- 97 : 5.99999997913496423136785042429
- 98 : 5.99999998261247019419009763519
- 99 : 5.99999998551039182941411843930
- 100 : 5.99999998792532652512667897273
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#2: Post edited
- You roll N dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer.
- - Your code must work for inputs up to and including 10, but may crash or error for larger inputs.
- ## Output
- The expected value (the mean value) of the dice result which is highest when N dice are rolled simultaneously.- - For inputs up to and including 10, the output must be correct to 6 decimal places.
- - If you provide more than 6 decimal places, they do not need to be correct.
- ## Test cases
- - Test cases are in the format `input : output`.
- - Outputs are shown to 29 decimal places, but only the first 6 are required.
- - Inputs are listed up to 100, but only the first 10 are required.
- ```text
- 1 : 3.50000000000000000000000000000
- 2 : 4.47222222222222222222222222222
- 3 : 4.95833333333333333333333333333
- 4 : 5.24459876543209876543209876543
- 5 : 5.43094135802469135802469135802
- 6 : 5.56029235253772290809327846365
- 7 : 5.65411736968449931412894375857
- 8 : 5.72435425716354214296601127877
- 9 : 5.77817697616598079561042524005
- 10 : 5.82015937306834154685092042202
- 11 : 5.85335706527894206506460735999
- 12 : 5.87988997582530915943632501068
- 13 : 5.90127519231210814088487715475
- 14 : 5.91862670254239982137663865269
- 15 : 5.93278028294863316396677461217
- 16 : 5.94437438620726706763129530818
- 17 : 5.95390415952465750681465958813
- 18 : 5.96175850647834296160754452251
- 19 : 5.96824613483573478052351165790
- 20 : 5.97361426407447557663984765006
- 21 : 5.97806232620687085074595293012
- 22 : 5.98175217846144708662154353022
- 23 : 5.98481583773702261975593217245
- 24 : 5.98736142198727564742707212114
- 25 : 5.98947777205805890939664416722
- 26 : 5.99123808700442039912763192534
- 27 : 5.99270281104071658824509961829
- 28 : 5.99392194517515569233729905843
- 29 : 5.99493691121505910010725938052
- 30 : 5.99578206374053429687749343718
- 31 : 5.99648592261006367516482569756
- 32 : 5.99707218178527995084736694167
- 33 : 5.99756053786868087649928650274
- 34 : 5.99796737246493066079858958712
- 35 : 5.99830631543055017861569950830
- 36 : 5.99858871066207446521322300997
- 37 : 5.99882400186341138245450681838
- 38 : 5.99902005242648948549576095711
- 39 : 5.99918341093743479553132394038
- 40 : 5.99931953172456703574223466691
- 41 : 5.99943295817706350108795983587
- 42 : 5.99952747519634081538911322617
- 43 : 5.99960623602945068095518442501
- 44 : 5.99967186782397404767755480207
- 45 : 5.99972655949737104393862636712
- 46 : 5.99977213489940115923030314943
- 47 : 5.99981011373944957989563752749
- 48 : 5.99984176233172849189022933653
- 49 : 5.99986813586456479870290813229
- 50 : 5.99989011361255339407569498867
- 51 : 5.99990842827184954870321285747
- 52 : 5.99992369040080016589174296589
- 53 : 5.99993640878350603044198445896
- 54 : 5.99994700739703671894286363020
- 55 : 5.99995583954916283311195393381
- 56 : 5.99996319965872384717127603489
- 57 : 5.99996933307188419526385210950
- 58 : 5.99997444424186859925185882190
- 59 : 5.99997870354508945667904295502
- 60 : 5.99998225296104051857478470078
- 61 : 5.99998521080539996849966854970
- 62 : 5.99998767567418855349310233867
- 63 : 5.99998972973050506993796648767
- 64 : 5.99999144144343063073206840811
- 65 : 5.99999286787042090723765344027
- 66 : 5.99999405655928101044676381654
- 67 : 5.99999504713313212275883242164
- 68 : 5.99999587261120873388929359398
- 69 : 5.99999656050951747707865703098
- 70 : 5.99999713375804914123485643137
- 71 : 5.99999761146511955791960329286
- 72 : 5.99999800955431870285999319781
- 73 : 5.99999834129530052211240888309
- 74 : 5.99999861774610705935749422818
- 75 : 5.99999884812177141008489719171
- 76 : 5.99999904010148652659540160860
- 77 : 5.99999920008457900651260250252
- 78 : 5.99999933340382043943812434706
- 79 : 5.99999944450318676665018476267
- 80 : 5.99999953708599101695409676737
- 81 : 5.99999961423832721062548685767
- 82 : 5.99999967853194025096373203645
- 83 : 5.99999973210995081498699422189
- 84 : 5.99999977675829274972286241220
- 85 : 5.99999981396524422736929682262
- 86 : 5.99999984497103703565235500206
- 87 : 5.99999987080919764938447871130
- 88 : 5.99999989234099812093652084287
- 89 : 5.99999991028416515396895975767
- 90 : 5.99999992523680433043315027918
- 91 : 5.99999993769733696566696999774
- 92 : 5.99999994808111415381537150814
- 93 : 5.99999995673426180535251837455
- 94 : 5.99999996394521817813134894619
- 95 : 5.99999996995434848644562432230
- 96 : 5.99999997496195707515102040223
- 97 : 5.99999997913496423136785042429
- 98 : 5.99999998261247019419009763519
- 99 : 5.99999998551039182941411843930
- 100 : 5.99999998792532652512667897273
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
- You roll N dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score?
- ## Input
- - A positive integer.
- - Your code must work for inputs up to and including 10, but may crash or error for larger inputs.
- ## Output
- - The expected value (the mean value) of the highest individual dice result when N dice are rolled simultaneously.
- - For inputs up to and including 10, the output must be correct to 6 decimal places.
- - If you provide more than 6 decimal places, they do not need to be correct.
- *Note that this means that if you find an incorrect algorithm that happens to give the correct first 6 decimal places for inputs from 1 to 10, that is still a valid entry.*
- ## Test cases
- - Test cases are in the format `input : output`.
- - Outputs are shown to 29 decimal places, but only the first 6 are required.
- - Inputs are listed up to 100, but only the first 10 are required.
- ```text
- 1 : 3.50000000000000000000000000000
- 2 : 4.47222222222222222222222222222
- 3 : 4.95833333333333333333333333333
- 4 : 5.24459876543209876543209876543
- 5 : 5.43094135802469135802469135802
- 6 : 5.56029235253772290809327846365
- 7 : 5.65411736968449931412894375857
- 8 : 5.72435425716354214296601127877
- 9 : 5.77817697616598079561042524005
- 10 : 5.82015937306834154685092042202
- 11 : 5.85335706527894206506460735999
- 12 : 5.87988997582530915943632501068
- 13 : 5.90127519231210814088487715475
- 14 : 5.91862670254239982137663865269
- 15 : 5.93278028294863316396677461217
- 16 : 5.94437438620726706763129530818
- 17 : 5.95390415952465750681465958813
- 18 : 5.96175850647834296160754452251
- 19 : 5.96824613483573478052351165790
- 20 : 5.97361426407447557663984765006
- 21 : 5.97806232620687085074595293012
- 22 : 5.98175217846144708662154353022
- 23 : 5.98481583773702261975593217245
- 24 : 5.98736142198727564742707212114
- 25 : 5.98947777205805890939664416722
- 26 : 5.99123808700442039912763192534
- 27 : 5.99270281104071658824509961829
- 28 : 5.99392194517515569233729905843
- 29 : 5.99493691121505910010725938052
- 30 : 5.99578206374053429687749343718
- 31 : 5.99648592261006367516482569756
- 32 : 5.99707218178527995084736694167
- 33 : 5.99756053786868087649928650274
- 34 : 5.99796737246493066079858958712
- 35 : 5.99830631543055017861569950830
- 36 : 5.99858871066207446521322300997
- 37 : 5.99882400186341138245450681838
- 38 : 5.99902005242648948549576095711
- 39 : 5.99918341093743479553132394038
- 40 : 5.99931953172456703574223466691
- 41 : 5.99943295817706350108795983587
- 42 : 5.99952747519634081538911322617
- 43 : 5.99960623602945068095518442501
- 44 : 5.99967186782397404767755480207
- 45 : 5.99972655949737104393862636712
- 46 : 5.99977213489940115923030314943
- 47 : 5.99981011373944957989563752749
- 48 : 5.99984176233172849189022933653
- 49 : 5.99986813586456479870290813229
- 50 : 5.99989011361255339407569498867
- 51 : 5.99990842827184954870321285747
- 52 : 5.99992369040080016589174296589
- 53 : 5.99993640878350603044198445896
- 54 : 5.99994700739703671894286363020
- 55 : 5.99995583954916283311195393381
- 56 : 5.99996319965872384717127603489
- 57 : 5.99996933307188419526385210950
- 58 : 5.99997444424186859925185882190
- 59 : 5.99997870354508945667904295502
- 60 : 5.99998225296104051857478470078
- 61 : 5.99998521080539996849966854970
- 62 : 5.99998767567418855349310233867
- 63 : 5.99998972973050506993796648767
- 64 : 5.99999144144343063073206840811
- 65 : 5.99999286787042090723765344027
- 66 : 5.99999405655928101044676381654
- 67 : 5.99999504713313212275883242164
- 68 : 5.99999587261120873388929359398
- 69 : 5.99999656050951747707865703098
- 70 : 5.99999713375804914123485643137
- 71 : 5.99999761146511955791960329286
- 72 : 5.99999800955431870285999319781
- 73 : 5.99999834129530052211240888309
- 74 : 5.99999861774610705935749422818
- 75 : 5.99999884812177141008489719171
- 76 : 5.99999904010148652659540160860
- 77 : 5.99999920008457900651260250252
- 78 : 5.99999933340382043943812434706
- 79 : 5.99999944450318676665018476267
- 80 : 5.99999953708599101695409676737
- 81 : 5.99999961423832721062548685767
- 82 : 5.99999967853194025096373203645
- 83 : 5.99999973210995081498699422189
- 84 : 5.99999977675829274972286241220
- 85 : 5.99999981396524422736929682262
- 86 : 5.99999984497103703565235500206
- 87 : 5.99999987080919764938447871130
- 88 : 5.99999989234099812093652084287
- 89 : 5.99999991028416515396895975767
- 90 : 5.99999992523680433043315027918
- 91 : 5.99999993769733696566696999774
- 92 : 5.99999994808111415381537150814
- 93 : 5.99999995673426180535251837455
- 94 : 5.99999996394521817813134894619
- 95 : 5.99999996995434848644562432230
- 96 : 5.99999997496195707515102040223
- 97 : 5.99999997913496423136785042429
- 98 : 5.99999998261247019419009763519
- 99 : 5.99999998551039182941411843930
- 100 : 5.99999998792532652512667897273
- ```
- ## Scoring
- This is a [code golf challenge]. Your score is the number of bytes in your code.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#1: Initial revision
Expected value of highest dice rolled
You roll N dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score? ## Input - A positive integer. - Your code must work for inputs up to and including 10, but may crash or error for larger inputs. ## Output - The expected value (the mean value) of the dice result which is highest when N dice are rolled simultaneously. - For inputs up to and including 10, the output must be correct to 6 decimal places. - If you provide more than 6 decimal places, they do not need to be correct. ## Test cases - Test cases are in the format `input : output`. - Outputs are shown to 29 decimal places, but only the first 6 are required. - Inputs are listed up to 100, but only the first 10 are required. ```text 1 : 3.50000000000000000000000000000 2 : 4.47222222222222222222222222222 3 : 4.95833333333333333333333333333 4 : 5.24459876543209876543209876543 5 : 5.43094135802469135802469135802 6 : 5.56029235253772290809327846365 7 : 5.65411736968449931412894375857 8 : 5.72435425716354214296601127877 9 : 5.77817697616598079561042524005 10 : 5.82015937306834154685092042202 11 : 5.85335706527894206506460735999 12 : 5.87988997582530915943632501068 13 : 5.90127519231210814088487715475 14 : 5.91862670254239982137663865269 15 : 5.93278028294863316396677461217 16 : 5.94437438620726706763129530818 17 : 5.95390415952465750681465958813 18 : 5.96175850647834296160754452251 19 : 5.96824613483573478052351165790 20 : 5.97361426407447557663984765006 21 : 5.97806232620687085074595293012 22 : 5.98175217846144708662154353022 23 : 5.98481583773702261975593217245 24 : 5.98736142198727564742707212114 25 : 5.98947777205805890939664416722 26 : 5.99123808700442039912763192534 27 : 5.99270281104071658824509961829 28 : 5.99392194517515569233729905843 29 : 5.99493691121505910010725938052 30 : 5.99578206374053429687749343718 31 : 5.99648592261006367516482569756 32 : 5.99707218178527995084736694167 33 : 5.99756053786868087649928650274 34 : 5.99796737246493066079858958712 35 : 5.99830631543055017861569950830 36 : 5.99858871066207446521322300997 37 : 5.99882400186341138245450681838 38 : 5.99902005242648948549576095711 39 : 5.99918341093743479553132394038 40 : 5.99931953172456703574223466691 41 : 5.99943295817706350108795983587 42 : 5.99952747519634081538911322617 43 : 5.99960623602945068095518442501 44 : 5.99967186782397404767755480207 45 : 5.99972655949737104393862636712 46 : 5.99977213489940115923030314943 47 : 5.99981011373944957989563752749 48 : 5.99984176233172849189022933653 49 : 5.99986813586456479870290813229 50 : 5.99989011361255339407569498867 51 : 5.99990842827184954870321285747 52 : 5.99992369040080016589174296589 53 : 5.99993640878350603044198445896 54 : 5.99994700739703671894286363020 55 : 5.99995583954916283311195393381 56 : 5.99996319965872384717127603489 57 : 5.99996933307188419526385210950 58 : 5.99997444424186859925185882190 59 : 5.99997870354508945667904295502 60 : 5.99998225296104051857478470078 61 : 5.99998521080539996849966854970 62 : 5.99998767567418855349310233867 63 : 5.99998972973050506993796648767 64 : 5.99999144144343063073206840811 65 : 5.99999286787042090723765344027 66 : 5.99999405655928101044676381654 67 : 5.99999504713313212275883242164 68 : 5.99999587261120873388929359398 69 : 5.99999656050951747707865703098 70 : 5.99999713375804914123485643137 71 : 5.99999761146511955791960329286 72 : 5.99999800955431870285999319781 73 : 5.99999834129530052211240888309 74 : 5.99999861774610705935749422818 75 : 5.99999884812177141008489719171 76 : 5.99999904010148652659540160860 77 : 5.99999920008457900651260250252 78 : 5.99999933340382043943812434706 79 : 5.99999944450318676665018476267 80 : 5.99999953708599101695409676737 81 : 5.99999961423832721062548685767 82 : 5.99999967853194025096373203645 83 : 5.99999973210995081498699422189 84 : 5.99999977675829274972286241220 85 : 5.99999981396524422736929682262 86 : 5.99999984497103703565235500206 87 : 5.99999987080919764938447871130 88 : 5.99999989234099812093652084287 89 : 5.99999991028416515396895975767 90 : 5.99999992523680433043315027918 91 : 5.99999993769733696566696999774 92 : 5.99999994808111415381537150814 93 : 5.99999995673426180535251837455 94 : 5.99999996394521817813134894619 95 : 5.99999996995434848644562432230 96 : 5.99999997496195707515102040223 97 : 5.99999997913496423136785042429 98 : 5.99999998261247019419009763519 99 : 5.99999998551039182941411843930 100 : 5.99999998792532652512667897273 ``` ## Scoring This is a [code golf challenge]. Your score is the number of bytes in your code. > Explanations are optional, but I'm more likely to upvote answers that have one. [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"