# Is it acceptable to create a dummy variable out of a quantitative variable?

I have a variable that takes the value of 5% or 10% throughout the data set. Is it okay to transform this variable into a dummy variable such that 10% (high) = 1 and 5% (low) = 0. I am running a logistic regression (binary response variable) and I want to know if the probability of event success i.e. y=1 decreases when the variable X increases. Is it acceptable to code 10% (high) = 1 and 5% (low) = 0. I ran a regression with this variable as a quantitative variable, but the output (coefficient) seemed to be unordinary.

Default | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]

x    |   15.46885   .2556751    60.50   0.000     14.96773    15.96996

You can. But this transformation will just scale down your coefficient. The z and p-value should stay the same.

• Thank you. If it is coded as a binary variable, how would the constant or intercept of logistic regression be interpreted? Would the constant indicate the probability of default(success event) when X=0? As such the probability y=1 when x=0, or in my case when x is low / 5%. Is this correct?
– LKho
Commented Sep 30, 2022 at 20:32
• Is this interpretation of constant in logistic regression for my case correct? "The probability of default of loans(y=1. success event) when X is 5%/low is eβ0 ÷ (1 + eβ0)"
– LKho
Commented Sep 30, 2022 at 20:39
• I think, yes, like this
– Alex
Commented Sep 30, 2022 at 20:59
• Thank you! Do you have an explanation as to why the coefficient for X variable was extraordinarily large? For reference, my dataset contains over 300k observations, majority of the observations take the value of 10% and 5% otherwise. Is it because the variable does not follow a range, but rather strictly 2 values? My histogram for X variable is also weird, I have one bar each on right end and left end, representing 10% and 5% respectively. Rationally speaking, it is not an outlier rather a requirement for the institution. continued in next comment
– LKho
Commented Sep 30, 2022 at 21:34
• If 5% and 10% are the majority but not all observations, this transformation leads to losing information that is hidden in your dataset. The amplitude of the coefficient shouldn't scare you, because after the logit/probit transformation, it will become a probability (a very extreme one), that's all.
– Alex
Commented Sep 30, 2022 at 21:48