Suppose I have some simple data for when someone buys or not buys something at a certain price, looking something like this:
ind buy price
1 1 11
2 1 14
3 0 20
4 1 13
5 1 19
6 0 16
. . .
. . .
. . .
10000 1 14
Where 1
would mean buying and 0
not buying at that certain price, the numbers are just made up. I would like to fit a logistic regression to this data, dont really care in what software/language but this example is in python with the result:
Logit Regression Results
==============================================================================
Dep. Variable: dependent No. Observations: 306
Model: Logit Df Residuals: 304
Method: MLE Df Model: 1
Date: Fri, 15 Apr 2016 Pseudo R-squ.: 0.01063
Time: 09:40:27 Log-Likelihood: -200.91
converged: True LL-Null: -203.07
LLR p-value: 0.03773
==============================================================================
coef std err z P>|z| [95.0% Conf. Int.]
------------------------------------------------------------------------------
price -0.2341 0.114 -2.058 0.040 -0.457 -0.011
intercept 2.4598 1.436 1.712 0.087 -0.356 5.275
==============================================================================
I'm not sure if a logistic regression would be the correct way to do this, but how would I maximize (not sure if im supposed to maximize anything though) the logistic function to determine what price would be the best price?
The optimal price would be defined where the total revenue is maximized, thus $E[R_i]=R_i⋅Pr(R_i)$ where $R_i$ would be the expected revenue of individ $i$ and $Pr(R_i)$ would be the probability of purchasing at that price. What would be the optimal price here?