void smoking()
{
double smoking[25] = { 77,
137 ,
117 ,
94 ,
116 ,
102 ,
111 ,
93 ,
88 ,
102 ,
91 ,
104 ,
107 ,
112 ,
113 ,
110 ,
125 ,
133 ,
115 ,
105 ,
87 ,
91 ,
100 ,
76 ,
66 };
double cancer[25] = { 84,
116,
123,
128,
155,
101,
118,
113,
104,
88,
104,
129,
86,
96,
144,
139,
113,
146,
128,
115,
79,
85,
120,
60,
51 };
TGraph* g = new TGraph( 25, smoking, cancer );
g->SetMarkerStyle( 20 );
g->SetMarkerSize( 1.0 );
g->SetMarkerColor( 4 );
g->SetTitle( "Rauchen und Lungenkrebs" );
g->Draw( "ap" );
g->GetHistogram()->SetXTitle( "Rauch-Index" );
g->GetHistogram()->SetYTitle( "Lungenkrebs-Index" );
cout << g->GetCorrelationFactor() << endl;
TF1* f0 = new TF1( "f0", "pol0", 0, 200 );
f0->SetLineColor( kGreen+3 );
TF1* f1 = new TF1( "f1", "pol1", 0, 200 );
g->Fit( "f0" );
g->Fit( "f1" );
f0->Draw( "same" );
}