median

median

Postby stan » Wed Nov 21, 2007 11:09 pm

i've spent past couple of days searching for an efficient algorithm to calculate median value that would be displayed in stats tables as the average value can be misleading sometimes. however i didn't find anything that calculates median in a single iteration over a list of values. all algorithms need multiple iterations and/or store the input values in a list. that's not usable in expert lotto as it processes millions of input values.
so i was thinking that i'd allow definition of 3 to 5 intervals for each stats table and then show how many values fall into each interval. the intervals would be user-defined as the user knows best what the range of values should and what to expect.

what do you think?
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Postby maroc » Wed Nov 21, 2007 11:25 pm

Hi Stan,


let's try it and see
maroc
 
Posts: 367
Joined: Mon Nov 08, 2004 8:45 pm

Postby Joe » Thu Nov 22, 2007 4:59 am

[quote=stan]
the intervals would be user-defined as the user knows best what the range of values should and what to expect.
what do you think?
[/quote]

This will be great stan,
Thanks
Joe
 
Posts: 1227
Joined: Mon Sep 18, 2006 6:51 pm
Location: Petaling Jaya, Malaysia

Postby Jerzy » Thu Nov 22, 2007 5:55 am

Yes, Stan, it could be useful. Probably the number of intervals would be the most important factor and, as such, it should be user-defined.

Thanks.
Jerzy
 
Posts: 811
Joined: Mon Sep 18, 2006 5:26 am

Postby CARBOB » Thu Nov 22, 2007 1:22 pm

[quote=Jerzy]
Yes, Stan, it could be useful. Probably the number of intervals would be the most important factor and, as such, it should be user-defined.

Thanks.
[/quote]


I agree. A very useful tool.
CARBOB
 
Posts: 874
Joined: Thu Jun 29, 2006 10:34 pm

Postby Midas » Thu Nov 22, 2007 5:05 pm

This might be helpful. ;-)

Best Regards
Midas
You do not have the required permissions to view the files attached to this post.
Midas
 
Posts: 144
Joined: Wed Apr 19, 2006 7:20 pm

Postby MartinMan » Thu Nov 22, 2007 5:43 pm

If it is what we can get, I will take it.
It would be a Lot better than the alternative.

Martin
MartinMan
 
Posts: 141
Joined: Mon Oct 02, 2006 9:38 pm

Postby Midas » Fri Nov 23, 2007 1:14 pm

Forgot to mention, to reduce the large sample size all that is needed is to use bootstrap sampling with an acceptable confidence interval to get a nice small representative sample.

Don't forget to shuffle(randomize) the sequence prior to sampling and that's it in a nutshell a fast efficient method.

For further background details see Kardi's tutorial.

http://people.revoledu.com/kardi/tutori ... index.html

Best Regards
Midas
Midas
 
Posts: 144
Joined: Wed Apr 19, 2006 7:20 pm

Postby CARBOB » Fri Nov 23, 2007 2:41 pm

[quote=Midas]
Forgot to mention, to reduce the large sample size all that is needed is to use bootstrap sampling with an acceptable confidence interval to get a nice small representative sample.

Don't forget to shuffle(randomize) the sequence prior to sampling and that's it in a nutshell a fast efficient method.

For further background details see Kardi's tutorial.

http://people.revoledu.com/kardi/tutori ... index.html

Best Regards
Midas
[/quote]

Midas, thank you for the link. Very good tutorial!!!
CARBOB
 
Posts: 874
Joined: Thu Jun 29, 2006 10:34 pm

Postby stan » Fri Nov 23, 2007 10:20 pm

thanks for the link midas. i think i can implement similar algorithm that would yield acceptable results without increased memory requirements
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm


Return to Comments, suggestions, features requests

Who is online

Users browsing this forum: No registered users and 4 guests