Causality icon indicating copy to clipboard operation
Causality copied to clipboard

Add float() in Chapter 3.4 IN[16] and IN[17]

Open pwe2202 opened this issue 5 months ago • 0 comments

Dear Bruno,

as far as I can see, to get the results in Chapter 3.4 - Front Door Criterion in lines OUT[16] and OUT[17] you should add float() to the individual parameters. I altered the code like this:

for Z in ['Tar', 'No Tar']:
    for Xl in ['Smokers', 'Non Smokers']:
        Prob1 += float(Cancer.loc[Xl, Z]) * float(P_Smoking.loc[Xl]) * float(P_Tar_Smoking.loc[Z, X])

Which returned the correct number instead of NaN.

greetings, Philipp

pwe2202 avatar Aug 06 '25 15:08 pwe2202