Skip to content

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

@pwe2202

Description

@pwe2202

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions