View Single Post
Old 07-26-2017, 05:47 PM   #19
SKG_Scintill
Spun a twirly fruitcake,
FFR Simfile AuthorFFR Veteran
 
SKG_Scintill's Avatar
 
Join Date: Feb 2009
Age: 31
Posts: 3,865
Default Re: Math Question - Probability

@Nathan: I made a code that does my formula to give you the average number instead
using 1 to 5, up to 10 times before taking the highest number
Code:
<?php

for ($m = 1; $m <= 10; $m++) {
	$res = 0;
	for ($n = 1; $n <= 5; $n++) {
		$part = $n * (pow($n,$m) - pow($n-1,$m));
		$res += $part;
	}
	$avg = $res / pow(5, $m);
	echo $avg . '<br/>';
}

here are the results:
3
3.8
4.2
4.4336
4.584
4.68704
4.76064
4.81477376
4.85544192
4.88647424

edit: tried to use wolframalpha to see what it could do with my formula, but it's giving me some harmonic number series, which I know nothing of
here's the formula I know nothing of

k, n and m being variables, H being... something mathematical

edit v2: for now I'll keep it at this formula, reposting it so I can at least sleep
k is highest number (1 to "5")
n is current number in summation
m is amount of times before taking highest number
average =
__________________





Quote:
Originally Posted by bluguerilla
So Sexy Robotnik (SKG_Scintill) {.0001/10} [--]
___
. RHYTHMS PR LAYERING
. ZOMG I HAD TO QUIT OUT TERRIBLE
.

Last edited by SKG_Scintill; 07-26-2017 at 06:10 PM..
SKG_Scintill is offline   Reply With Quote