PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm trying to calculate a time average. I have a start time and end time. I'm trying to calculate how long it took to take a quiz for a group of quiz takers. The problem is that there are couple people "throwing the curve".
time (in seconds)
1
2
100
300
200
343
233
3400
340000
I would like to programatically remove the "curve throwers" before calculating the average.
How do you do it? Is there a Mysql function I should be using other than avg? Here's my exsisting query.
1. Determine how many results there are. (In an array)
2. Multiply total results by .1 and round up the next whole int.
3. Remove the value of number 2 from the front and back of the array of results sorted asc or desc.