Say I have a table of data with four columns labelled A, B, C, D, where each entry is either a 0 or 1, how do I calculate P(D=1|A=1,B=1,C=1) directly from the data? Here, event D Is dependent upon events A, B, C. Can I apply the conditional probability formula P(D|A,B,C)=P(A,B,C,D)/P(A,B,C)? Also, to calculate the joint probability P(A=1,B=1,C=1) directly from the data, do I just count number of rows with A=1, B=1and C=1, divided by total number of rows? Here, events A, B, C, D are not independent. Thanks, any help is greatly appreciated!