Question

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 p

Please use RStudio to solve this problem, thank you so much in advance.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:-

Given that

diff = 1 tolerance = 1e-6 i_old = 0.006 i_new = 0. while diff > tolerance: i_new = (1-pow( 1+i_old, -20)) / 19 diff = abs(i_n

We need to iteratively calculate the new interest i_new from i_old and keep track of their difference as well as updating i_old to the newer calculated value. The loop breaks when the difference is lesser than the given threshold/tolerance.

Code Snippet (R program)

diff = 1
tolerance = 1e-6

i_old = 0.006
i_new = 0.

while (diff >= tolerance) {
i_new = (1 - (1+i_old) ** (-2)) / 19
  
diff = abs(i_new - i_old)
i_old = i_new

print(diff)
}

print("Final Interest")
print(i_new)

Thanks for supporting...

Please give positive rating...

Add a comment
Know the answer?
Add Answer to:
Please use RStudio to solve this problem, thank you so much in advance. 2. Suppose a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I really do not understand this... please help with explanations. thank you so much in advance! Paragraph stalled, b...

    I really do not understand this... please help with explanations. thank you so much in advance! Paragraph stalled, but first we need to close some apps. Update now 1. All other things equal, how will the following impact the future value: a) increase in the present value, b) decrease in the interest rate, c) increase in the number of time periods. 3 points 2. All other things equal, how will the following impact the present value: a) increase in the...

  • Please show me the data in SAS and the output. Thank you so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1. 2....

    Please show me the data in SAS and the output. Thank you so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1. 2. It has been suggested that central nervous system malformations in newborns may be related to the hardness of water supplies. Data on the number of central nervous system malformations per 1000 births, and water hardness (in ppm) were collected from 20 geographic regions. These data are stored in "ens.xls" on ELC in two columns: 1 malformation rate (per 1000 births), and 2) hardness (ppm)....

  • Please use own words. Thank you. CASE QUESTIONS AND DISCUSSION > Analyze and discuss the questions...

    Please use own words. Thank you. CASE QUESTIONS AND DISCUSSION > Analyze and discuss the questions listed below in specific detail. A minimum of 4 pages is required; ensure that you answer all questions completely Case Questions Who are the main players (name and position)? What business (es) and industry or industries is the company in? What are the issues and problems facing the company? (Sort them by importance and urgency.) What are the characteristics of the environment in which...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT