English Français

Documentation / User's manual in C++ : PDF version

XIV.12. Macros UncertModeler

XIV.12. Macros UncertModeler

XIV.12.1. Macro "uncertModelerTestsYoungsModulus.C"

XIV.12.1.1. Objective

The objective of the macro is to pass the 3 tests of fit based on Empirical Distribution Function (EDF) statistics (Kolmogorov-Smirnov (D), Cramer-VonMises (W2) and Anderson-Darling (A2)) on the attribute "E" in the "youngsmodulus" dataset. The tested law is the "normal" distribution when both the mean (30576) and variance (1450) are set or when both are defined either from the sample.

XIV.12.1.2. Macro Uranie

{
  TDataServer *tds = new TDataServer();
  tds->fileDataRead("youngsmodulus.dat");
  
  TCanvas *c = new TCanvas("c1", "Test on youngsmodulus dataset",13,38,1210,1874);
  TPad *pad = new TPad("pad","pad",0, 0.03, 1, 1); pad->Draw();
  pad->Divide(1,3);
  
  TTestKolmogorovSmirnov *tks = new TTestKolmogorovSmirnov(tds,"E");
  pad->cd(1); tks->computeScore("normal:normal(30576,1450)");
  
  TTestCramerVonMises *tcvm = new TTestCramerVonMises(tds,"E");
  pad->cd(2); tcvm->computeScore("normal:normal(30576,1450)");
  
  TTestAndersonDarling *tad = new TTestAndersonDarling(tds,"E");
  pad->cd(3); tad->computeScore("normal:normal(30576,1450)");
      
}

XIV.12.1.3. Graph

Figure XIV.113. Graph of the macro macro "uncertModelerTestsYoungsModulus.C"

Graph of the macro macro "uncertModelerTestsYoungsModulus.C"