Calculate conditional probabilities on a logistic regression I am analysing data of an digital advertising tool. I have access to all the exposures for each of the 6 channels (x1, x2, .., x6) of an online campaign. The outcome is the conversion (y=1 or 0) on the website.
My goal is to calculate an attribution model and credit each of the channels with the number of conversions that he deserves.
I started by creating a logistic regression between the numbers of exposures by channel (x1,..,x6) to explain the conversion.  
                  Coef    S.E.   Wald Z Pr(>|Z|)  
 Intercept      -6.7910 0.0938 -72.36 <0.0001   
 x1              0.0756 0.0193   3.92 <0.0001   
 x2              0.0698 0.0091   7.64 <0.0001   
 x3              0.0020 0.0002  11.05 <0.0001   
 x4              0.0172 0.0057   3.03 0.0024    
 x5              0.0304 0.0045   6.82 <0.0001   
 x6             -0.0132 0.0042  -3.17 0.0015 

In order to give credit to each of the channels, I’d like to use the Shapley Value, applied to the different conditional probabilities.
So I am calculating now these conditional probabilities but I am not sure how that my formula is the right one. 
For example, if I want to know the probability of users to convert if exposed to channel 1, then the formula will be: 
$$P(Y|X_1 = x_1) = \text{mean}\big(\frac{e^{-6.7910 + 0.0756x_1}}{1+e^{-6.7910 + 0.0756x_1}}\big)$$
For all the x1 values of my data. 
To calculate P(Y|X1 and X2) then I will to the same but with X1 and X2 values.
I am not entirely sure of the method, could someone confirm to me that it is the right way to calculate conditional probabilities on a logistic regression?
 A: 
I am not entirely sure of the method, could someone confirm to me that it is the right way to calculate conditional probabilities on a logistic regression?

You almost have it. But before correcting it, think about what your formula is saying:


*

*The left hand side is a probability. We know these are bounded between 0 and 1.

*The right hand side is taking the mean of some expression.


*

*Are we sure that the mean of that expression is bounded between 0 and 1? In this case actually we are because that expression itself happens to be bounded between 0 and 1. But in general we aren't...

*What does it even mean (sorry) to take the average/mean of that expression? Aren't we calculating the probability that $Y=1$ given some value for $X_1$? In which case that expression returns a single number. So taking the average doesn't really apply.



Hopefully that provides some intuition as to why taking the mean isn't correct.
The correct form is:
$$P(Y=1|X=x) = \frac{e^{\alpha + x\beta}}{1 + e^{\alpha + x\beta}}$$
I suspect that you're taking the mean because you want the mean response ($Y$) to following a logistic/sigmoid function:
$$E[Y|X=x] = P(Y=1|X=x) = \text{logit}^{-1}(\alpha + x\beta)$$
The reason this works is because $Y$ only takes on values of 1 (with probability $\pi(X)$) or 0 ($1 - \pi(X)$). So:
$$E[Y|X] = 1 \times \pi(X) + 0 \times (1 - \pi(X)) = \pi(X) = P(Y=1|X)$$
