0
$\begingroup$

I would like to know if there is a way to predict an outcome (successful/failed or $1/0$) with and without a binary variable and compare their predict probability.

I have several variables. However, I consider only one of them: it is a binary variable indicating $$ X=\left\{\array{1 & \textrm{if proposition was made}\\0 & \textrm{otherwise}}\right. $$ The outcome $Y$ is whether the contract was successful, i.e. $$ Y=\left\{\array{1 & \textrm{if contract successful}\\0 & \textrm{otherwise}}\right. $$

What I want is actually to know in the future if I should propose or not the supplement, i.e. whether to set $X=1$ or rather $X=0$. Because sometimes when it is proposed ($X=1$) the contract is not successful ($Y=0$).

$\endgroup$
0
$\begingroup$

Quite basic approach is to calculate the probability of success for both possibilities $P(Y=1|X=0) = \frac{N_{X=0 \land Y=1}}{N_{X=0}}$

$P(Y=1|X=1) = \frac{N_{X=1 \land Y=1}}{N_{X=1}}$

where $N_{\textrm{statement}}$ stands for number of records where statement was true.

After this, you can pick $X=0$ or $X=1$ for which the probability is higher.

$\endgroup$
3
  • $\begingroup$ Thanks a lot for your response. How can I have the probability for both of these possibilities for each observations with a ML model ? $\endgroup$
    – Minila S
    Oct 31 '18 at 10:34
  • $\begingroup$ I thought of outputing the 2 probabilities in the two cases by putting X equal to 0 or 1 to simulate the two cases. $\endgroup$
    – Minila S
    Oct 31 '18 at 11:01
  • $\begingroup$ $P(Y=0|X=1)=1-P(Y=1|X=1)$ Does it help? $\endgroup$ Oct 31 '18 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.