1
$\begingroup$

I am stuck at where how can I get the most dependent variables based on the mean

I have this dataset and when I try to:

df.groupby('left').mean()

It gives the output:

enter image description here

And one of my friends said, from that graph the dependent variables for the attribute left will be

1.Satisfaction Level

2.Average Monthly Hours

3.Promotion Last 5 Years

I am wondering How could someone guess that?

$\endgroup$

3 Answers 3

0
$\begingroup$

in Statistics, the independent variables are inputs over which you have control. The dependent variables are the outcome observed by altering the values of the independent variables. Therefore, the answer is "it depends".

Therefore, if you are studying how alterations of left values influence the values of satisfaction level. Then, left values is your independent variables and satisfaction is your independent variables

Instead, if your friend was concluding that variations in left values causes changes in Satisfaction Level, Average Monthly Hours and Promotion Last 5 Years, then, it is a very biased conclusion based on no significant evidence. It would be more appropriate to talk about correlations between variables for which you only know that some behavior appear together (correlated) without identifying any causal effect.

$\endgroup$
4
  • $\begingroup$ is there a way I can find the impact of those variables on left ? $\endgroup$
    – To Rrent
    Apr 12, 2020 at 9:51
  • 1
    $\begingroup$ Doing a logistic regression and analysis of coefficients/feature importances will show you what features where useful for the model. If you want to establish causality, you should take a look at this article: statisticssolutions.com/establishing-cause-and-effect $\endgroup$
    – Rusoiba
    Apr 12, 2020 at 9:58
  • $\begingroup$ If you want to model this using ML, keep in mind that you don't have to prove causality to create a model that is useful and performant. $\endgroup$
    – Rusoiba
    Apr 12, 2020 at 10:00
  • $\begingroup$ I am using decision tree algorithm for this. $\endgroup$
    – To Rrent
    Apr 12, 2020 at 10:01
0
$\begingroup$

When you look a satisfaction_level, you see that the mean of group0 is 50% higher than group1 mean. So, on average "satisfaction of left=0 people is more important than satisfaction of left=1 people". Now if a new person has a very high satisfaction level, it is more likely that he is from group 0.

You have to check if the difference in means is statistically significant. Otherwise, this difference could be a coincidence.

As @Seymour stated, you cannot draw conclusions about causality but only about patterns of co-occurrence.

$\endgroup$
0
$\begingroup$

You can create a light model ( like Random Forest ) and read it after print it. Or you can use EBM to understand which feature affect your result and in which proportion.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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