Question: has to be a working code on RStudio!! also, would i type it into the console space or the script? 2. Suppose a car dealer

has to be a working code on RStudio!! also, would i type it into the console space or the script?
2. Suppose a car dealer promotes two options for the purchase of a new $20 000 car. The first option is for the customer to pay up front and receive a $1000 rebate. The second option is 0%-interest financing where the customer makes 20 monthly payments of $1000 beginning in one month's time. Because of option 1, the effective price of the car is really $19,000, so the dealer really is charging some interest rate i for option 2. We can calculate this value using the formula for the present value of an annuity: Use a while() loop to iteratively calculate the interest rate i which satisfies the fixed- point equation (1 (1 + iola) -20) inew 19 Use a starting guess of 10 0.006. Stop the calculation when two successive values of the interest rate are less than 0.000001 apart. 2. Suppose a car dealer promotes two options for the purchase of a new $20 000 car. The first option is for the customer to pay up front and receive a $1000 rebate. The second option is 0%-interest financing where the customer makes 20 monthly payments of $1000 beginning in one month's time. Because of option 1, the effective price of the car is really $19,000, so the dealer really is charging some interest rate i for option 2. We can calculate this value using the formula for the present value of an annuity: Use a while() loop to iteratively calculate the interest rate i which satisfies the fixed- point equation (1 (1 + iola) -20) inew 19 Use a starting guess of 10 0.006. Stop the calculation when two successive values of the interest rate are less than 0.000001 apart
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
