# Some Fractiles of Normal Medians

Discussion in 'Scientific Statistics Math' started by Luis A. Afonso, Dec 10, 2010.

1. ### Luis A. AfonsoGuest

Some Fractiles of Normal Medians

___TABLE

________0.600__0.750__0.800
________0.950__0.975__0.990__0.995

_n=7____0.116__0.309__0.385__
________0.754__0.900__1.070__1.186
___9____0.103__0.275__0.343__
________0.670__0.799__0.951__1.055
__11____0.094__0.250__0.311__
________0.609__0.727__0.863__0.957
__13____0.086__0.230__0.287__
________0.562__0.671__0.797__0.882
__15____0.081__0.215__0.268__
________0.524__0.626__0.743__0.824
__17____0.076__0.203__0.253__
________0.494__0.589__0.698__0.774

REM "MED-G"
CLS : PRINT : PRINT " ***** MED-G ***** ";
PRINT " FRACTILES OF NORMAL MEDIANS "
INPUT " all= "; all
pi = 4 * ATN(1)
DIM x(101), y(101), z(101), W(8001)
FOR n = 7 TO 18 STEP 2: COLOR 7
FOR j = 1 TO all
RANDOMIZE TIMER
LOCATE 7, 50
PRINT USING "##########"; all - j
COLOR 14
PRINT " .600 .750 .800";
PRINT " .950 .975 .990 .995 "
PRINT " 0.253 0.674 0.842";
PRINT " 1.645 1.960 2.326 2.576 "
REM
REM
locc = INT(n / 2) + 1: REM THE MEDIAN location
FOR i = 1 TO n
aa = SQR(-2 * LOG(RND))
x(i) = aa * 1 * COS(2 * pi * RND)
y(i) = x(i)
NEXT i
REM
FOR t = 1 TO n: v = x(t): c = 1
FOR y = 1 TO n
IF y(y) < v THEN c = c + 1
NEXT y: z(c) = v: NEXT t
REM
wi = z(locc) + 4: wii = INT(1000 * wi +.5)
IF wii < 0 THEN wii = 0
IF wii > 8000 THEN wii = 8000
W(wii) = W(wii) + 1 / all
NEXT j
REM
v(1) = .6: v(2) = .75: v(3) = .8
v(4) = .95: v(5) = .975: v(6) = .99: v(7) = .995
FOR vi = 1 TO 7: v = v(vi): s = 0
FOR i = 0 TO 8000
s = s + W(i)
IF s > v THEN GOTO 44
NEXT i
44 LOCATE 5 + n, -9 + 10 * vi
PRINT USING " ##.### "; i / 1000 - 4;
NEXT vi
LOCATE 5 + n, 1: PRINT USING "###"; n
FOR i = 0 TO 8000: W(i) = 0: NEXT i
NEXT n
END

Luis A. Afonso, Dec 10, 2010

2. ### HenryGuest

I think "quantiles" is more common than "fractiles". Some of those
numbers look slightly out, from the following using the R project:
+ qnorm(qbeta(q, halfup(s), halfup(s)))}
0.6 0.75 0.8
0.95 0.975 0.99 0.995
7 0.11582476 0.3085066 0.3850679
0.7543432 0.9000322 1.0701745 1.1865441
9 0.10295407 0.2742042 0.3422363
0.6701922 0.7994716 0.9503583 1.0534988
11 0.09359376 0.2492604 0.3110927
0.6090371 0.7264104 0.8633348 0.9568868
13 0.08639363 0.2300752 0.2871405
0.5620264 0.6702617 0.7964773 0.8826799
17 0.07589013 0.2020912 0.2522059
0.4935003 0.5884406 0.6990905 0.7746194

Henry, Dec 13, 2010

3. ### Luis A. AfonsoGuest

Thank you very much Henry!
Can you say me wantÂ´s the procedure to
get analytically the quantiles (fractiles)?

Luis A. Afonso, Dec 13, 2010
4. ### HenryGuest

As an order statistic, the sample median has a Beta distribution, so you
need to take the suitable quantile of a Beta distribution to get a value
while you can then apply to the distribution you are taking the sample
from (in this case normal)

So for example with a sample size of 7, the median has to a distribution
where 3 values are lower and 3 higher, so proportional to x^3*(1-x)^3,
i.e. a distribution ~beta(x;4,4). The 0.600 quantile of a beta(x;4,4)
distribution is about 0.5461, while the 0.5461 quantile of a standard

Looking at my previous post, I omitted the line for a sample size
of 15. It should have been:
15 0.08063362 0.2147286 0.2679817
0.5244394 0.6253785 0.7430494 0.8233912

Henry, Dec 14, 2010
5. ### Luis A. AfonsoGuest

Thank you a lot, Henry: my theoretical education in Mathematics of Statistics has flaws, I must admit, in this case the Beta Distribution. Your explanation is clear and the example enlighten. I was a Physicist very early in my professional carrier *seduced* by Data Mining, so I often fall into this kind of situations as the present one.
Thank you very much by your kind concern. My English, too, is barbaric, Portuguese is a Latin language, whichâ€™s very, very different compared with Germanic-English ones. All constrains to an easy communication . . .

*Tchau*

Luis

Luis A. Afonso, Dec 14, 2010