Calculating conditional probabilities among all columns in a data frame

r
machine_learning
probability
python
bayes

#1

Hello,

I have a data frame that has answers to 10 questions. Answers are binary data {0,1}.
Can someone please advice how to find conditional probabilities among all 10 columns
for ex: P(Q1|Q2 =1) and P(Q1|Q2 =1 & Q3=1) and P(Q1|Q2 =1 & Q3=1 & Q4=1)and so on for all possible combinations.

Attaching data as wellStudentAssesmentDataMatrices.csv (230 Bytes)

Please advice.

Thanks