Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.stat.math.independent

Topic: Whatever the distribution, no matter the statistics
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Luis A. Afonso

Posts: 4,518
From: LIsbon (Portugal)
Registered: 2/16/05
Whatever the distribution, no matter the statistics
Posted: Nov 6, 2013 3:22 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Whatever the distribution, no matter the statistics

Need not (perhaps) to insist: through simulation (Monte Carlo) we are able to find the EDF (Empirical DF) of a known parameter estimator being only enough that we have a way to simulate the source Distribution.
Example: What is the 1-tails confidence interval, alpha=0.05, for the sample means of 4 df Chi-squared?
The routine below, 1 million of chi-squared size 10 samples, obtained each chi value by adding the squares of four N(0,1) values (Box-Muller formula) gave as 95% quantile:
____1st attempt_____2.068
____2nd___________2.066
Therefore the 1-tail confidence interval for the sample means is [0, 2.07].

Luis A. Afonso

REM "M-CHI4"
CLS
PRINT : PRINT " <M-CHI4> "
REM
DEFDBL A-Z
INPUT " sample size = "; n
INPUT " all = "; all
DIM chi(8001)
pi = 4 * ATN(1)
FOR j = 1 TO all
LOCATE 5, 40: PRINT USING "#######"; all - j
RANDOMIZE TIMER
FOR i = 1 TO n
xy = 0
FOR ii = 1 TO 4
aa = SQR(-2 * LOG(RND))
u = aa + COS(2 * pi * RND)
xy = xy + u * u / n
NEXT ii
x = INT(1000 * xy + .5)
IF x > 8000 THEN x = 8000
NEXT i
chi(x) = chi(x) + 1 / all
NEXT j
REM
cc = .95
sum = 0
FOR t = 0 TO 8000
sum = sum + chi(t)
IF sum > cc THEN GOTO 15
NEXT t
15 LOCATE 17, 50
PRINT USING "##.### "; t / 1000; sum
END



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.