Created
September 16, 2014 15:06
-
-
Save pn11/08463ae4ba8c443a54bb to your computer and use it in GitHub Desktop.
TMath::KolmogorovProb() (http://root.cern.ch/root/html/src/TMath.cxx.html#RDBIQ) のソースが良くわからない(c1, c2, c3という謎の係数が出てくる)のでちゃんと正しい値なのか描いてみた件。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
Int_t npoint = 10000; | |
Double_t x, xstart = 0., xend = 2.0; | |
TGraph *g1 = new TGraph(); | |
for (Int_t ipoint=0; ipoint<npoint; ipoint++){ | |
x = xstart + (xend - xstart) / double(npoint) * double(ipoint); | |
g1->SetPoint(ipoint, x, TMath::KolmogorovProb(x)); | |
} | |
g1->SetTitle("Kolmogorov distribution"); | |
g1->SetLineColor(kRed); | |
g1->GetXaxis()->SetTitle("X"); | |
g1->GetYaxis()->SetTitle("P[X]"); | |
g1->Draw("AL"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment