Challenge

Project 1

Ans 1)

The data contains information about individuals, their ages, genders, BMI, number of children, whether they are smokers, regions, and their insurance charges. It includes features like "age," "sex," "bmi," "children," "smoker," "region," and "charges." It appears to be supervised data as it provides the target variable ("charges"),

Ans 2)

n = Z⊃2;*p*(1-p)

n = required sample size.

Z = Z-score associated with the desired confidence level (99% confidence, Z ≈ 2.58).

p = proportion of accurate predictions (99�curate predictions,p=0.99).

E = precision (0.02).

Substituting the values:

n= (2.58)⊃2;*0.99*(1-0.99) / (0.02)⊃2;

= 6.6564 * 0.0099 / (0.0004)   

= 0.06589836 / 0.0004         = 164.74

Rounded up to the nearest whole number, we need a min. a sample size of approximately 165.

Ans 3)  In the given data, there were no null values but there were some outliers and one duplicate value which was cleaned with the help of pandas.

(file attached as data cleaning.ipnynb)

Ans 4) The variables 'sex' and 'smoking' are independent. (checked in python, file attached below as 'Project 1')

Ans 5) The correlation values are closer to 0 suggest that the variables are more independent of each other.

(observed in python with correlation matrix test).

Ans 6) No dependencies found between response and regressors as values found close to 0 suggest that little or no dependency.

(in python)

About attachments:

Updated_insurance.csv : it is an updated file of insurance after data cleaning.

Data cleaning.ipynb : steps for data cleaning ( answer to question 3)

 Projects.ipynb : answers to all questions from 4 to 11.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.