# Price Optimization

I ran linear regression on my hotel reservation data and obtained the following model fit in R:

Sales = 170.2 + 3.6*Days_left_to_checkIn + 7.6*Revenue - 9.6*Room_Rate -7.67*cancellation_price + 4.8*Number_of_cancelled_Room -8.9*Online_reputation_of_Hotel

After this, I used the Optimize function to optimize the equation for maximum revenue (Revenue = Room_Rate* Sales)

after substituting all the values of variables I got this equation

f=-9.6*Room_Rate^2 + Room_Rate*253.56

Optimize(f, lwr=10, upr=524)

What is the next step to calculate Room_Rate to maximize the revenue (revenue = Room_Rate * Sales)? Is there any better way to optimize the function of demand?

You are trying to maximize $-9.6*R^2 + R*253.56$, where $R$ is the room rate. The maximum will be achieved where the derivative is 0, aka $-19.2R + 253.53 = 0$. Solving for $R$, we conclude that the maximum is achieved at $R = 13.20$.