• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Correct statistics analysis

ZorakBane

Smash Journeyman
Joined
Jan 8, 2002
Messages
447
Location
Kalamazoo, MI
================
Hypothesis 1
================

You should clear out garbage throws as to "set up" for a 9.

================
RESULTS
================
Clearing out garbage throws will always give you approx 14.30% chance of hitting a 9

1/7 is approx 14.28

================
DATA
================
the extra %'s are mulitple runs

How many throws per life?
1
How many lives do you want to test?
160000
How many times do you want to test?
8
After 1280000 throws Average = 14.25% 14.33% 14.32%

How many throws per life?
2
How many lives do you want to test?
80000
How many times do you want to test?
8
After 1280000 throws Average = 14.29% 14.25% 14.27%

How many throws per life?
3
How many lives do you want to test?
53333
How many times do you want to test?
8
After 1279992 throws Average = 14.36% 14.31% 14.31%

How many throws per life?
4
How many lives do you want to test?
40000
How many times do you want to test?
8
After 1280000 throws Average = 14.27% 14.31% 14.40%

How many throws per life?
20
How many lives do you want to test?
8000
How many times do you want to test?
8
After 1280000 throws Average = 14.28% 14.27% 14.27%

Just to clean the bag..
How many throws per life?
20
How many lives do you want to test?
160000
How many times do you want to test?
8
After 25600000 throws Average = 14.27%


================
CODE
================
#include <stdio.h>
#include <time.h>

int hammer(int i, int last1, int last2);

int main(void)
{
srand(time(0));
int i, j, jj, x=0, last1=2, last2=1, counter=0, throwsperlife, lives, times, average=0;


printf("How many throws per life?\n");
scanf("%d", &throwsperlife);
printf("How many lives do you want to test?\n");
scanf("%d", &lives);
printf("How many times do you want to test?\n");
scanf("%d", &times);

for(jj=0; jj<times;jj++)
{
for(j=1; j<=lives; j++)
{
for (i=1; i<=throwsperlife;i++)
{
x=hammer(i, last1, last2);
printf("Final throw is %d\n", x);
last2 = last1;
last1 = x;
if(x==9)
{
printf("Hit a 9, at roll %d on life %d\n", i, j);
counter++;
printf("Hit a 9 clearing out two garbage throws.\n");
printf("=======================================\n");
x=hammer(i, last1, last2);
printf("Final throw is %d\n", x);
last2 = last1;
last1 = x;
x=hammer(i, last1, last2);
printf("Final throw is %d\n", x);
last2 = last1;
last1 = x;
printf("=======================================\n");
}

}
printf("Died, reset throw probability\n\n");
last1=1;
last2=2;

}
// printf("After %d throws, you have a %.2f%% chance of throwing a 9\n", lives*throwsperlife, (float)( (float)(counter)/(float)(lives*throwsperlife)*100 ) );
average+=(float)((float)(counter)/(float)(lives*throwsperlife)*100);
// counter=0;
}
printf("After %d throws Average = %.2f%%\n", lives*throwsperlife*times, (float)((float)(counter*100)/(float)(lives*throwsperlife*times)));

system("pause");
}

int hammer(int i, int last1, int last2)
{
int hammerval=0, junk=0;
hammerval = 1 + rand()%9;
printf("Threw a %d on try %d\n", hammerval, i);
printf("Last two throws are %d and %d\n", last1, last2);

while( (hammerval==last1 || hammerval==last2) )
{
printf("Can't throw %d or %d, throwing again!\n", last1, last2);
hammerval = 1 + rand()%9;
}

return hammerval;
}

================
SAMPLE RUN
================
How many throws per life?
3
How many lives do you want to test?
5
How many times do you want to test?
2
Threw a 7 on try 1
Last two throws are 2 and 1
Final throw is 7
Threw a 4 on try 2
Last two throws are 7 and 2
Final throw is 4
Threw a 3 on try 3
Last two throws are 4 and 7
Final throw is 3
Died, reset throw probability

Threw a 9 on try 1
Last two throws are 1 and 2
Final throw is 9
Hit a 9, at roll 1 on life 2
Hit a 9 clearing out two garbage throws.
=======================================
Threw a 1 on try 1
Last two throws are 9 and 1
Can't throw 9 or 1, throwing again!
Threw a 4 on try 1
Final throw is 4
Threw a 9 on try 1
Last two throws are 4 and 9
Can't throw 4 or 9, throwing again!
Threw a 2 on try 1
Final throw is 2
=======================================
Threw a 2 on try 2
Last two throws are 2 and 4
Can't throw 2 or 4, throwing again!
Threw a 7 on try 2
Final throw is 7
Threw a 9 on try 3
Last two throws are 7 and 2
Final throw is 9
Hit a 9, at roll 3 on life 2
Hit a 9 clearing out two garbage throws.
=======================================
Threw a 3 on try 3
Last two throws are 9 and 7
Final throw is 3
Threw a 8 on try 3
Last two throws are 3 and 9
Final throw is 8
=======================================
Died, reset throw probability

Threw a 6 on try 1
Last two throws are 1 and 2
Final throw is 6
Threw a 9 on try 2
Last two throws are 6 and 1
Final throw is 9
Hit a 9, at roll 2 on life 3
Hit a 9 clearing out two garbage throws.
=======================================
Threw a 8 on try 2
Last two throws are 9 and 6
Final throw is 8
Threw a 9 on try 2
Last two throws are 8 and 9
Can't throw 8 or 9, throwing again!
Threw a 7 on try 2
Final throw is 7
=======================================
Threw a 2 on try 3
Last two throws are 7 and 8
Final throw is 2
Died, reset throw probability

Threw a 2 on try 1
Last two throws are 1 and 2
Can't throw 1 or 2, throwing again!
Threw a 1 on try 1
Can't throw 1 or 2, throwing again!
Threw a 5 on try 1
Final throw is 5
Threw a 6 on try 2
Last two throws are 5 and 1
Final throw is 6
Threw a 2 on try 3
Last two throws are 6 and 5
Final throw is 2
Died, reset throw probability

Threw a 7 on try 1
Last two throws are 1 and 2
Final throw is 7
Threw a 1 on try 2
Last two throws are 7 and 1
Can't throw 7 or 1, throwing again!
Threw a 3 on try 2
Final throw is 3
Threw a 2 on try 3
Last two throws are 3 and 7
Final throw is 2
Died, reset throw probability

Threw a 2 on try 1
Last two throws are 1 and 2
Can't throw 1 or 2, throwing again!
Threw a 2 on try 1
Can't throw 1 or 2, throwing again!
Threw a 9 on try 1
Final throw is 9
Hit a 9, at roll 1 on life 1
Hit a 9 clearing out two garbage throws.
=======================================
Threw a 2 on try 1
Last two throws are 9 and 1
Final throw is 2
Threw a 6 on try 1
Last two throws are 2 and 9
Final throw is 6
=======================================
Threw a 4 on try 2
Last two throws are 6 and 2
Final throw is 4
Threw a 5 on try 3
Last two throws are 4 and 6
Final throw is 5
Died, reset throw probability

Threw a 5 on try 1
Last two throws are 1 and 2
Final throw is 5
Threw a 5 on try 2
Last two throws are 5 and 1
Can't throw 5 or 1, throwing again!
Threw a 3 on try 2
Final throw is 3
Threw a 8 on try 3
Last two throws are 3 and 5
Final throw is 8
Died, reset throw probability

Threw a 3 on try 1
Last two throws are 1 and 2
Final throw is 3
Threw a 4 on try 2
Last two throws are 3 and 1
Final throw is 4
Threw a 7 on try 3
Last two throws are 4 and 3
Final throw is 7
Died, reset throw probability

Threw a 7 on try 1
Last two throws are 1 and 2
Final throw is 7
Threw a 1 on try 2
Last two throws are 7 and 1
Can't throw 7 or 1, throwing again!
Threw a 9 on try 2
Final throw is 9
Hit a 9, at roll 2 on life 4
Hit a 9 clearing out two garbage throws.
=======================================
Threw a 9 on try 2
Last two throws are 9 and 7
Can't throw 9 or 7, throwing again!
Threw a 9 on try 2
Can't throw 9 or 7, throwing again!
Threw a 4 on try 2
Final throw is 4
Threw a 7 on try 2
Last two throws are 4 and 9
Final throw is 7
=======================================
Threw a 9 on try 3
Last two throws are 7 and 4
Final throw is 9
Hit a 9, at roll 3 on life 4
Hit a 9 clearing out two garbage throws.
=======================================
Threw a 2 on try 3
Last two throws are 9 and 7
Final throw is 2
Threw a 9 on try 3
Last two throws are 2 and 9
Can't throw 2 or 9, throwing again!
Threw a 9 on try 3
Can't throw 2 or 9, throwing again!
Threw a 5 on try 3
Final throw is 5
=======================================
Died, reset throw probability

Threw a 2 on try 1
Last two throws are 1 and 2
Can't throw 1 or 2, throwing again!
Threw a 7 on try 1
Final throw is 7
Threw a 2 on try 2
Last two throws are 7 and 1
Final throw is 2
Threw a 5 on try 3
Last two throws are 2 and 7
Final throw is 5
Died, reset throw probability

After 30 throws Average = 20.00%
Press any key to continue . . .
 

ZorakBane

Smash Journeyman
Joined
Jan 8, 2002
Messages
447
Location
Kalamazoo, MI
=====================
Hypothesis 2
=====================

Statistics on throwing a 9, x times per life without clearing out garbage throws.
Clean out your garbage throws if you can!

=====================
RESULTS
=====================

1st throw 1/7 or 14.28%
2 throws 1/7.55 or 13.25%
3 throws 1/8.09 or 12.35%
4 throws 1/8.33 or 12%

and plateaus off

20 throws 1/8.86 or 11.28%

=====================
DATA
=====================
extra %'s are multiple runs

How many throws per life?
1
How many lives do you want to test?
160000
How many times do you want to test?
8
After 1280000 throws Average = 14.27% 14.29% 14.26%

How many throws per life?
2
How many lives do you want to test?
80000
How many times do you want to test?
8
After 1280000 throws Average = 13.28% 13.23% 13.27%

How many throws per life?
3
How many lives do you want to test?
53333
How many times do you want to test?
8
After 1279992 throws Average = 12.34% 12.35% 12.35%

How many throws per life?
4
How many lives do you want to test?
40000
How many times do you want to test?
8
After 1280000 throws Average = 12.02% 12.00% 12.00%

How many throws per life?
20
How many lives do you want to test?
8000
How many times do you want to test?
8
After 1280000 throws Average = 11.27% 11.29% 11.33%



=====================
CODE
=====================
#include <stdio.h>
#include <time.h>

int hammer(int i, int last1, int last2);

int main(void)
{
srand(time(0));
int i, j, jj, x=0, last1=2, last2=1, counter=0, throwsperlife, lives, times, average=0;


printf("How many throws per life?\n");
scanf("%d", &throwsperlife);
printf("How many lives do you want to test?\n");
scanf("%d", &lives);
printf("How many times do you want to test?\n");
scanf("%d", &times);

for(jj=0; jj<times;jj++)
{
for(j=1; j<=lives; j++)
{
for (i=1; i<=throwsperlife;i++)
{
x=hammer(i, last1, last2);
printf("Final throw is %d\n", x);
last2 = last1;
last1 = x;
if(x==9)
{
printf("Hit a 9, at roll %d on life %d\n", i, j);
counter++;
}

}
printf("Died, reset throw probability\n\n");
last1=1;
last2=2;

}
// printf("After %d throws, you have a %.2f%% chance of throwing a 9\n", lives*throwsperlife, (float)( (float)(counter)/(float)(lives*throwsperlife)*100 ) );
average+=(float)((float)(counter)/(float)(lives*throwsperlife)*100);
// counter=0;
}
printf("After %d throws Average = %.2f%%\n", lives*throwsperlife*times, (float)((float)(counter*100)/(float)(lives*throwsperlife*times)));

system("pause");
}

int hammer(int i, int last1, int last2)
{
int hammerval=0, junk=0;
hammerval = 1 + rand()%9;
printf("Threw a %d on try %d\n", hammerval, i);
printf("Last two throws are %d and %d\n", last1, last2);

while( (hammerval==last1 || hammerval==last2) )
{
printf("Can't throw %d or %d, throwing again!\n", last1, last2);
hammerval = 1 + rand()%9;
printf("Threw a %d on try %d\n", hammerval, i);
}

return hammerval;
}

=====================
SAMPLE RUN
=====================
How many throws per life?
3
How many lives do you want to test?
5
How many times do you want to test?
2
Threw a 4 on try 1
Last two throws are 2 and 1
Final throw is 4
Threw a 2 on try 2
Last two throws are 4 and 2
Can't throw 4 or 2, throwing again!
Threw a 9 on try 2
Final throw is 9
Hit a 9, at roll 2 on life 1
Threw a 5 on try 3
Last two throws are 9 and 4
Final throw is 5
Died, reset throw probability

Threw a 5 on try 1
Last two throws are 1 and 2
Final throw is 5
Threw a 4 on try 2
Last two throws are 5 and 1
Final throw is 4
Threw a 3 on try 3
Last two throws are 4 and 5
Final throw is 3
Died, reset throw probability

Threw a 5 on try 1
Last two throws are 1 and 2
Final throw is 5
Threw a 3 on try 2
Last two throws are 5 and 1
Final throw is 3
Threw a 8 on try 3
Last two throws are 3 and 5
Final throw is 8
Died, reset throw probability

Threw a 2 on try 1
Last two throws are 1 and 2
Can't throw 1 or 2, throwing again!
Threw a 9 on try 1
Final throw is 9
Hit a 9, at roll 1 on life 4
Threw a 1 on try 2
Last two throws are 9 and 1
Can't throw 9 or 1, throwing again!
Threw a 7 on try 2
Final throw is 7
Threw a 8 on try 3
Last two throws are 7 and 9
Final throw is 8
Died, reset throw probability

Threw a 7 on try 1
Last two throws are 1 and 2
Final throw is 7
Threw a 3 on try 2
Last two throws are 7 and 1
Final throw is 3
Threw a 8 on try 3
Last two throws are 3 and 7
Final throw is 8
Died, reset throw probability

Threw a 2 on try 1
Last two throws are 1 and 2
Can't throw 1 or 2, throwing again!
Threw a 1 on try 1
Can't throw 1 or 2, throwing again!
Threw a 7 on try 1
Final throw is 7
Threw a 7 on try 2
Last two throws are 7 and 1
Can't throw 7 or 1, throwing again!
Threw a 7 on try 2
Can't throw 7 or 1, throwing again!
Threw a 7 on try 2
Can't throw 7 or 1, throwing again!
Threw a 9 on try 2
Final throw is 9
Hit a 9, at roll 2 on life 1
Threw a 3 on try 3
Last two throws are 9 and 7
Final throw is 3
Died, reset throw probability

Threw a 3 on try 1
Last two throws are 1 and 2
Final throw is 3
Threw a 7 on try 2
Last two throws are 3 and 1
Final throw is 7
Threw a 1 on try 3
Last two throws are 7 and 3
Final throw is 1
Died, reset throw probability

Threw a 6 on try 1
Last two throws are 1 and 2
Final throw is 6
Threw a 3 on try 2
Last two throws are 6 and 1
Final throw is 3
Threw a 6 on try 3
Last two throws are 3 and 6
Can't throw 3 or 6, throwing again!
Threw a 3 on try 3
Can't throw 3 or 6, throwing again!
Threw a 2 on try 3
Final throw is 2
Died, reset throw probability

Threw a 6 on try 1
Last two throws are 1 and 2
Final throw is 6
Threw a 2 on try 2
Last two throws are 6 and 1
Final throw is 2
Threw a 8 on try 3
Last two throws are 2 and 6
Final throw is 8
Died, reset throw probability

Threw a 3 on try 1
Last two throws are 1 and 2
Final throw is 3
Threw a 8 on try 2
Last two throws are 3 and 1
Final throw is 8
Threw a 4 on try 3
Last two throws are 8 and 3
Final throw is 4
Died, reset throw probability

After 30 throws Average = 10.00%
Press any key to continue . . .
 

Wikipedia

Smash Lord
Joined
Apr 4, 2007
Messages
1,823
Location
Resurrected.
It is an analysis of whether it is the best choice to do random judgment hammer attacks to "clear out" the bad ones and be on the verge of a 9.
 

The Phenom

Smash Lord
Joined
Jan 6, 2007
Messages
1,213
Location
California,(818),Los Angeles
This is so amazing that I can't really tell if its just plain philosophy uncovered of how to generate a nine! Very nice,... I understand and I've test the results to your obervations and prove are true. I have been using similar calculations too Cool to see you ZorakBane with your own. I usually in every match kill 2 stock out of 3 with my Mr.G&W !
 

Galt

Smash Journeyman
Joined
Feb 10, 2007
Messages
286
Location
Austin, TX
...Wasn't this... already fully known/obvious? They already tested the hammer thoroughly. All you need to know is that you have to throw two hammers in between getting the same. There are lots of numbers there to calculate that the 9 shows up one in nine times at random, which was already obvious because there are only 9 hammers, and that at any given time, you only actually have a 1/7, 1/8, or 0/9 chance of throwing the 9, depending on how you've used the hammer so far. And we already knew all of that.
 

GimR

GimR, Co-Founder of VGBootCamp
Joined
Nov 2, 2006
Messages
5,602
Location
Maryland
NNID
VGBC_GimR
dude, the 9 is linked to the timer as long as you didn't have a nine in one of the two hammers before. I know some of the times at which it works, I don't know if I want to tell at which times yet though.
 

ZorakBane

Smash Journeyman
Joined
Jan 8, 2002
Messages
447
Location
Kalamazoo, MI
...Wasn't this... already fully known/obvious? They already tested the hammer thoroughly. All you need to know is that you have to throw two hammers in between getting the same. There are lots of numbers there to calculate that the 9 shows up one in nine times at random, which was already obvious because there are only 9 hammers, and that at any given time, you only actually have a 1/7, 1/8, or 0/9 chance of throwing the 9, depending on how you've used the hammer so far. And we already knew all of that.
wrong its 1/7, 0, 0, 1/7, 1/7 1/7

assuming you get a 9 first

im researching the timer right now.. ill post any findings.. but general statistics.. this is it
 

ZorakBane

Smash Journeyman
Joined
Jan 8, 2002
Messages
447
Location
Kalamazoo, MI
...Wasn't this... already fully known/obvious? They already tested the hammer thoroughly. All you need to know is that you have to throw two hammers in between getting the same. There are lots of numbers there to calculate that the 9 shows up one in nine times at random, which was already obvious because there are only 9 hammers, and that at any given time, you only actually have a 1/7, 1/8, or 0/9 chance of throwing the 9, depending on how you've used the hammer so far. And we already knew all of that.
wrong its 1/7, 0, 0, 1/7, 1/7 1/7

assuming you get a 9 first

im researching the timer right now.. ill post any findings.. but general statistics.. this is it
 

snoblo

Smash Journeyman
Joined
Jul 25, 2007
Messages
361
HOLY **** DID HE POST LINES OF CODE FROM THE FRIKKING GAME?!?!

Zorak, I want your babies.
lol no, he just made his own code in c++ (you're using dev-c++ am i right? system(pause) isn't part of standard c++ :lick:) to simulate what the probability of getting a 9 is, assuming its completely random.

Good luck, Zorak! I can't wait til you find something extraordinary! :)


EDIT: wow I just realized there are SOO many new threads on this new phenomenon. lol
 

ZorakBane

Smash Journeyman
Joined
Jan 8, 2002
Messages
447
Location
Kalamazoo, MI
nothing new about it, just new stuff to test
to me its still the same old hammer that you should reset in order "set up" for a nine
 
Top Bottom