Skip to content
Prev 140105 / 398506 Next

function for the average or expected range?; CORECTION

Hi, Greg: 

      1.  I did the integration in Excel for four reasons:  First, it's 
easier (even for me) to see what's happening and debug for something 
that simple.  Second, my audience were people who were probably not R 
literate, and they could likely understand and use the Excel file easier 
than than an R script.  Third, my experience with the R 'integrate' has 
been less than satisfactory, especially when integrating from (-Inf) to 
Inf.  Finally, to check my work, I often program things like that first 
in Excel then in R.  If I get the same answer in both, I feel more 
confident in my R results.  I haven't programmed this result in R yet, 
but if I do, the fact that I already did it in Excel will make it easier 
for me to be confident of the answers.  The function 
"getParamerFun{qAnalyst}" gets the correct answer from n = 2:25 but 
returns wrong answers outside that range. 


      2.  I think the "CORRECTION TO CORRECTION" included a correct 
formula: 

           E(R) = n*integral{-Inf to Inf of x*[(F(x))**(n-1) - 
(1-F(x))**(n-1)]*dF(x).

      The "CORRECTION" omitted the "x*".  The first version had many 
more problems. 

      Am I communicating?  
      Best Wishes,
      Spencer
Greg Snow wrote: