Question

In: Statistics and Probability

Predicting the Amount of Money Spent on Insured Customers For this assignment, we will be analyzing...

Predicting the Amount of Money Spent on Insured Customers

For this assignment, we will be analyzing insured customers' data for an insurance company:

Based on a sample data that consists of the profile of insured customers, we want to be able to predict the dollar amount of money spent by the insurance company on insured customers.

Insured ustomers' Data

The insured customers' data is in a csv file. It has information sconsisting of:

1.age

2.sex (female, male)

3.BMI

4.Children

5.Smoker (yes, no)

6.Region (northeast, northwest, southeast, southwest])

7.expenses

The value we want to predict is expenses

Necessary files are in onedrive:

https://1drv.ms/u/s!Al0FoC_cg4VI3r5Y-ORAr_DjO5etwQ

https://1drv.ms/u/s!Al0FoC_cg4VI3r5X-v6AWSBI2zapLw

Solutions

Expert Solution

I write R-code for that problem. But before run this code first
copy the given data from Excel. then run it:

The R-code is:


b=read.table("clipboard",header=T)
head(b,10)
attach(b)
x1=as.numeric(sex)
x2=as.numeric(smoker)
x3=as.numeric(region)
l=lm(expenses~age+x1+bmi+children+x2+x3)
summary(l)

And the output is:


> summary(l)

Call:
lm(formula = expenses ~ age + x1 + bmi + children + x2 + x3)

Residuals:
Min 1Q Median 3Q Max
-11340 -2811 -1021 1407 29740

Coefficients:
Estimate Std. Error t value Pr(>|t|)   
(Intercept) -35152.71 1174.34 -29.934 < 2e-16 ***
age 257.27 11.89 21.646 < 2e-16 ***
x1 -131.15 332.80 -0.394 0.69359   
bmi 332.64 27.72 12.000 < 2e-16 ***
children 479.56 137.64 3.484 0.00051 ***
x2 23819.32 411.83 57.838 < 2e-16 ***
x3 -353.49 151.92 -2.327 0.02013 *  
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 6060 on 1331 degrees of freedom
Multiple R-squared: 0.7508, Adjusted R-squared: 0.7496
F-statistic: 668.2 on 6 and 1331 DF, p-value: < 2.2e-16


Thus the regression equation is:


expenses=(257.27)*age - (131.15)*sex + (332.64)*bmi + (479.56)*children +(23819.32)*smoker-(353.49)*region

Thus we can predict value of expenses by putting other known values in regression equation.


Related Solutions

The number of customers in a local dive shop depends on the amount of money spent...
The number of customers in a local dive shop depends on the amount of money spent on advertising. If the shop spends nothing on advertising, there will be 105 customers/day. If the shop spends $100, there will be 170 customers/day. As the amount spent on advertising increases, the number of customers/day increases and approaches (but never exceeds) 300 customers/day. (a) Find a linear to linear rational function y = f(x) that calculates the number y of customers/day if $x is...
The amount of money spent by Superstore customers is normally distributed with mean 150 and a...
The amount of money spent by Superstore customers is normally distributed with mean 150 and a standard deviation of 12. Suppose that a sample of 64 customers are selected. Answer the following questions. What is the mean of the sampling distribution? 150 140 170 240 What is the standard error of the sampling distribution? 1.23 1.50 1.55 1.20 What is the probability that the average spending by the customers is greater than 154? 0.9962 0.9966 0.0038 0.0048 What is the...
The distribution of the amount of money spent by students on textbooks in a semester is...
The distribution of the amount of money spent by students on textbooks in a semester is approximately normal in shape with a mean of 349 and a standard deviation of 24. According to the standard deviation rule, approximately 95% of the students spent between _____$ and _____$ on textbooks in a semester. Question 12 Type numbers in the boxes. 1 points The distribution of IQ (Intelligence Quotient) is approximately normal in shape with a mean of 100 and a standard...
The distribution of the amount of money spent by students on textbooks in a semester is...
The distribution of the amount of money spent by students on textbooks in a semester is approximately normal in shape with a mean of 349 and a standard deviation of 24. According to the standard deviation rule, approximately 95% of the students spent between ____$ and ____$ on textbooks in a semester. Question 12 Type numbers in the boxes. 1 points The distribution of IQ (Intelligence Quotient) is approximately normal in shape with a mean of 100 and a standard...
It is estimated that amounts of money spent on gasoline by customers at a gas station...
It is estimated that amounts of money spent on gasoline by customers at a gas station in Bristol, Englands, follow a normal distribution with a standard deviation of £3,4. It is also found that 5% of all the customers spent more than £30. What percentage of customers spent less than £25? (explain with steps)
4. Below is the amount that a sample of 15 customers spent for lunch ($) at...
4. Below is the amount that a sample of 15 customers spent for lunch ($) at a fast-food restaurant: 7.42 6.29 5.83 6.50 8.34 9.51 7.10 5.90 4.89 6.50 5.52 7.90 8.30 9.60 6.80 Recall the lunch at a fast-food restaurant problem from Assignment 4. Let µ represent the population mean amount spent for lunch ($) at a fast-food restaurant. Previously you calculated the mean and standard deviation of the fifteen sample measurements to be x ̅ = $7.09 and...
A study was conducted to compare males and females and the amount of money spent on...
A study was conducted to compare males and females and the amount of money spent on a particular mobile phone app. Data for a large random sample of males (n>1000) and a large random sample of females (n>1000) were extracted. What type of analysis will best allow us to determine if the average amount of money spent on the particular mobile phone app is greater for males than for females? options: An independent samples comparison of population means. A paired...
Question 10: The distribution of the amount of money spent by students on textbooks in a...
Question 10: The distribution of the amount of money spent by students on textbooks in a semester is approximately normal in shape with a mean of 494 and a standard deviation of 39. According to the standard deviation rule, approximately 68% of the students spent between $_____ and $ ______ on textbooks in a semester. Question 11: The distribution of IQ (Intelligence Quotient) is approximately normal in shape with a mean of 100 and a standard deviation of 16. According...
The table below contains the amount that a sample of nine customers spent for lunch ($)...
The table below contains the amount that a sample of nine customers spent for lunch ($) at a fast-food restaurant: 4.88 5.01 5.79 6.35 7.39 7.68 8.23 8.71 9.88 a.Compute the sample mean and sample standard deviation of the amount spent for lunch. b.Construct a 99% confidence interval estimate for the population mean amount spent for lunch ($) at the fast-food restaurant, assuming the population is normally distributed. c.Interpret the interval constructed in (b). Better to use the computer text...
The table below contains the amount that a sample of nine customers spent for lunch ($)...
The table below contains the amount that a sample of nine customers spent for lunch ($) at a fast-food restaurant: 4.88 5.01 5.79 6.35 7.39 7.68 8.23 8.71 9.88 a. Compute the sample mean and sample standard deviation of the amount spent for lunch. b. Construct a 99% confidence interval estimate for the population mean amount spent for lunch ($) at the fast-food restaurant, assuming the population is normally distributed. c. Interpret the interval constructed in (b).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT