MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Difference of 2 CDF functions 

I'm trying to calculate the difference of 2 CDF functions, coming from 2 normal populations, in order to calculate the error. I have 2 sample data of the same size. 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 12 Mar, 2009 18:04:01 Message: 2 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gpbh9p$k2k$1@fred.mathworks.com>... 
Subject: Difference of 2 CDF functions From: Peter Perkins Date: 12 Mar, 2009 20:02:40 Message: 3 of 23 
Themis wrote: 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gpbiqh$6ik$1@fred.mathworks.com>... 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 12 Mar, 2009 20:57:01 Message: 5 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gpbqea$fvs$1@fred.mathworks.com>... 
>Why would you do that when the cumulative normal distribution is a >wellknown function that can be calculated? Doing it this way only makes >your comparison less accurate. 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 12 Mar, 2009 23:45:06 Message: 7 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gpc19l$2qc$1@fred.mathworks.com>... 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gpc6q2$f51$1@fred.mathworks.com>... 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 13 Mar, 2009 02:56:01 Message: 9 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gpc9g5$crs$1@fred.mathworks.com>... 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gpci01$ov8$1@fred.mathworks.com>... 
I thought of attaching this pic to make my problem more clear. 
Another point I have to make is that the calulated data i am trying to plot its CDF function comes out in random order, so i have to sort them from lowest to greatest before I run normcdf, which I guess this might be wrong but I can't find a way around it. 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 14 Mar, 2009 17:43:01 Message: 13 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gpg4du$fht$1@fred.mathworks.com>... 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gpgqb5$r6v$1@fred.mathworks.com>... 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 14 Mar, 2009 20:30:04 Message: 15 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gph0ng$ek4$1@fred.mathworks.com>... 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gph44c$5h3$1@fred.mathworks.com>... 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 15 Mar, 2009 02:05:04 Message: 17 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gph67p$9v6$1@fred.mathworks.com>... 
Thank you for your reply Roger. I am going to try what you suggested first thing in the morning as I;m getting ready for bed since its 230am now in the UK, and I will let you know as soon as I get any results. 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gphnog$ntf$1@fred.mathworks.com>... 
Also I have just observed that the CDF plot of your method yields a different plot than when using the Distribution fitting tool, to plot the CDF. The 2 plots dont seem to match, except for the point (0,0.5) 
"Themis " <thkountouris@hotmail.com> wrote in message <gpj3iu$5q2$1@fred.mathworks.com>... 
Subject: Difference of 2 CDF functions From: Roger Stafford Date: 17 Mar, 2009 00:36:02 Message: 22 of 23 
"Themis " <thkountouris@hotmail.com> wrote in message <gpmhk4$ce1$1@fred.mathworks.com>... 
Yes, that makes sense to me Roger, thank you. 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.