Jump to content

Recommended Posts

I am trying to have PHP calculate some sort of percentile that can be passed to flash (I know that part) and flash will display it as a bargraph. What I need help on is calculating the percentile.
In my example we have a time for running a distance. I have the time of the current user and the average time of all the times in the database (calculated by adding all the times in the database and dividing by number of records).
I need to determine where this user fits in to the mix. Ideally it would be which percentile (by 10s) that this user falls into. The higher the percentile the better. (ex "he is in the 90th percentile)
I can retrieve highest and lowest scores if neeed but it would be better if there is some percentage calculation based on this users time compared to the average time - as long as it can be displayed on a bar graph I am in good shape.

Thanks,

Ryan
Link to comment
https://forums.phpfreaks.com/topic/13070-php-percentile-script/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.