DDP Week 4 Presentation

Hans U Deck
1. Mai 2022

App description

The main focuses of the app are:

  • The DDP Week 4 Assigment app examines the behavior of BMI (body mass index) vs. insurance costs in the United States.

  • Data from smokers and non-smokers are examined. Further, Linear Regression is calculated and plotted on a graph with the data.

  • Through a slider, a BMI value can be set, from which the prediction of expected charges is calculated.

Data used

The following data was used:

  age    sex    bmi children smoker    region   charges
1  19 female 27.900        0    yes southwest 16884.924
2  18   male 33.770        1     no southeast  1725.552
3  28   male 33.000        3     no southeast  4449.462
4  33   male 22.705        0     no northwest 21984.471
5  32   male 28.880        0     no northwest  3866.855

Example of the chart

This diagram shows the dependence of the Charges on the BMI divided into smokers and non-smokers. The two straight lines are the linear regression of smokers and non-smokers.

plot of chunk unnamed-chunk-2

Input mask

The following data can be entered:

  • BMI value with a slider

  • Show/Hide Smoker data

  • Show/Hide Non Smoker data

  • Submit button for execution