From: "Themis " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Difference of 2 CDF functions
Date: Sat, 14 Mar 2009 21:06:02 +0000 (UTC)
Organization: Harvard Business School Press
Lines: 12
Message-ID: <gph67p$9v6$>
References: <gpbh9p$k2k$> <gpbiqh$6ik$> <gpbqea$fvs$> <gpbsut$4mc$> <gpc19l$2qc$> <gpc6q2$f51$> <gpc9g5$crs$> <gpci01$ov8$> <gpd13r$pl1$> <gpg4du$fht$> <gpgqb5$r6v$> <gph0ng$ek4$> <gph44c$5h3$>
Reply-To: "Themis " <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1237064762 10214 (14 Mar 2009 21:06:02 GMT)
NNTP-Posting-Date: Sat, 14 Mar 2009 21:06:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 70275
Xref: comp.soft-sys.matlab:524910

"Roger Stafford" <> wrote in message <gph44c$5h3$>...
>   You are still not coming through to me at all clearly, Themis.  What do you mean by "Then I create another another vector b = 2.9 : 3.3 ."?  By what means is it created?  Surely not as it stands there; you would get only one value in b that way.  If you use the same M and N in another Weyl sum, you should get the same results.  What do you mean by "Then I run normcdf for both vectors and get 2 other vectors, say c and d."?  What mean and variance value(s) do you give to 'normcdf', those that you have calculated from the Weyl sums?  If so, you are allowing the Weyl sums to dictate the mean and variance.  You should be rescaling and translating the Weyl sums to match a fixed normal distribution, say the standard normal.  When you subtract e = d-c, do d and c have like numbers of points?  If so, you must have used the same M value in the original Weyl sums, but perhaps different N's?  
> Anyway, what is the significance of comparing different normal distributions, c and d?  You should be comparing a with c or b with d.  I think you need to explain things in much, much greater detail if I am to understand what the problem is. 
> Roger Stafford

Vector b has the same number of elements as a. That is not the way i create it though, i just didnt want to get into much detail about that.
I use b=-2.9 : x : 3.3 , where x is the step required in order for b and a to have the same number of elements. So a and b have the same number of elements. However, the step is not constant for vector a, therefore I think that is why I get such a big value for the error.

I always take k=3 for now. If I take k=2, the distribution doesn;t appear to be Normal. So this is all for the case where k=3. If I change M,N I get a different vector a. 
I am trying to find the difference for a fixed value of M and N. I am not talking about taking a different Weyl sum. I am saying take a value for M,N , get a vector a. Then compare the CDF of vector a to the CDF of a standard normal distribution with the same mean and variance of the Weyl Sum. The reason for this is, since I can see that the 2 CDF's almost match and the PDF of vector a appears to be Normally distributed as well. The ultimate goal is to prove that the Weyl sum is Normally distributed. The way to do that is to compare the CDF of the Weyl sum to the CDF of Normal distribution.
i hope this makes things more clear.