I have data that given me both a user's score for a test, along with the high, average, and low across the class for every test. How would I estimate the user's percentile with this data?

We know that the students in the class do not change from test to test and every test for this class is in the data below.

I was thinking I would do something along the lines of calculating z-score first, but am unable to actually substantiate how to do this.

I asked a similar question before, but the answerer suggested I reask with data. I would highly recommend a look at that answer for a more detailed approach, however I try to summarize to the best of my understanding:

In order to calculate the z-score, we must first estimate $\sigma$. To do this, we use the function $\sigma = \frac{\max - > \min}{-10.07i^{-0.1376}+10.35}$, where I is the number of tests. We may then proceed by the z-score formula ($\frac{x-\mu}{\sigma}$, where x is usr_score) to find the z-score. However, I'm confused as to how I would turn the z-score given by the above formula to the percentile value. For example, if I were to be given $i=7$, $x=157$, $\max=157$, $\min=103.7$, and $\mu=145.3$, I would get $\sigma \approx 20.147355$ and $z \approx 0.5807$. However, this does not make sense, as that means that the max possible score is still within one standard deviation of the mean.

Some example data:

| test_name | usr_score  |    max     |    avg     |    min     | weight |
| Test_1    | 0.94615385 | 1          | 0.92307692 | 0.65384615 |     26 |
| Test_2    | 0.71621622 | 0.95945946 | 0.79459459 | 0.74074074 |     37 |
| Test_3    | 1          | 1          | 0.92222222 | 0.7037037  |     27 |
| Test_4    | 0.85135135 | 0.97297297 | 0.85675676 | 0.66756757 |     37 |
| Test_5    | 0.83333333 | 1          | 0.76666667 | 0          |      6 |
| Test_6    | 1          | 1          | 0.92857143 | 0.66666667 |     21 |

Given this data, we know the user's total score is 135.6 (usr_score $*$ weight). Similarly, the average score is 134.1, the maximum score one test-taker may have is 151.6, and the minimum score one test-taker may have is 102.1, although it is unlikely that one person has either the minimum or maximum score as one person probably didn't always score the best/worst. I'd like to calculate the percentile of the user, but am unsure how to do that.

Using the above method of calculating z-score, we get $\mu \approx 19.91362$ and $z \approx 0.075325$ although I have no way of verifying the values. It does, however pass the eye test (given multiple sets of data (many people in different classes) the z-scores look like they are in the correct order when sorted).

Also I am a stat noob programmer, so sorry if this question is trivial.

  • $\begingroup$ The answer given by @BruceET in the linked question, is probably the best you can hope. We are missing way too many parameters to make any reasonable answer without a shedload of assumptions that can all be easily dismissed. $\endgroup$ – usεr11852 May 23 '20 at 19:30
  • $\begingroup$ @usεr11852 what does BruceET's answer actually give though? It doesn't seem to be a true representation of z-score $\endgroup$ – qag54938bcaoo May 23 '20 at 22:25
  • $\begingroup$ Any solution is bound to make a number of approximations/assumptions. For example, I can hypothesis that average score of 134.1 corresponds to the overall median, so the score of 135.6 corresponds to a percentile of 53.67% (spline(y= c(0,0.5,1), x=c(102.107,134.1,151.5), xout=135.6)$y). And this would omit the need for a $\hat{\sigma}$ estimate altogether. :) Also given your comment of "z-scores look like they are in the correct order when sorted" why not just rank all users and then assign the percentiles accordingly? $\endgroup$ – usεr11852 May 24 '20 at 0:44
  • $\begingroup$ @usεr11852 The problem is I don't have all user's data. The problem becomes trivial at that point. However, I'd like to be able to at least somewhat say that "you are probably at percentile $x_1$ and it'll take you $y$ amount of work to get to percentile $x_2$. I have $x_2$ and the function that translates an approximate $x_1$ to a $y$. However, I am stuck on how to even approximate $x_1$. Is this not possible at all? $\endgroup$ – qag54938bcaoo May 24 '20 at 2:59
  • $\begingroup$ @usεr11852 Furthermore, this shows that it does not take the max value into account at all. If it were taken into account, the theoretical max MUST be at 100%, although it is likely to be beyond. $\endgroup$ – qag54938bcaoo May 26 '20 at 1:06

One possible distribution for the total scores is a triangular distribution with minimum $a=102.1$, maximum $b=151.6$, and mean $(a+b+c)/3=134.1$, which means the mode $c=148.6$. The graph below shows the pdf. In that case the student with a score of $135.6$ is slightly above the mean but below the median, at roughly the $49$th percentile.

pdf of triangular distribution with mean, median, mode

  • $\begingroup$ Why would the distribution be triangular? If anything, I would assume a left skewed normal distribution. Furthermore, I don't understand how this is expandable; "49th percentile" was visually estimated. For example if the score was higher, we would not be be to estimate it as easily. Is there any way to do this reliably? $\endgroup$ – qag54938bcaoo May 26 '20 at 0:25
  • $\begingroup$ I computed the percentile exactly using the cdf (as in the Wikipedia link), and rounded it to avoid misleading precision. There is not nearly enough data to specify a distribution well, triangular or otherwise. But “a left skewed normal distribution” does not exist, and the triangular distribution makes for easy calculations and easy adjustment of different assumptions. $\endgroup$ – Matt F. May 26 '20 at 0:42
  • $\begingroup$ So we must assume that the a value is the theoretical min and the b value is the theoretical min even though this is not likely? I understand there is not enough data; I assumed this would be a regression problem. Just to clarify, the CDF output gives us percentile (I'm very new to stats). The skew normal distribution. $\endgroup$ – qag54938bcaoo May 26 '20 at 1:04
  • $\begingroup$ For a skew-normal distribution, I don’t know what parameters would be good, since it has no min or max. For a triangular distribution, you can choose other values for the min and max $a$ and $b$, and then calculate the mode $c$ that gives the right mean. Then, yes, the cdf gives the percentile. $\endgroup$ – Matt F. May 26 '20 at 1:11
  • 1
    $\begingroup$ I added a sentence of explanation about the graph, but I don't think it's worth commenting further. $\endgroup$ – Matt F. May 26 '20 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.