Analyze the data using the numpy library

Assignment Help Other Subject
Reference no: EM132389205

Assignment -

Problem Statement: You are consulted by a health insurance company to analyze its insurance dataset. The goal is produce a set of descriptive statistics. The dataset is in the txt file format (insurance.txt) and is available under the homework folder.

The file includes 1,338 examples of beneficiaries currently enrolled in the insurance plan, with features indicating characteristics of the patient as well as the total medical expenses charged to the plan for the calendar year. The features are:

  • age: An integer indicating the age of the primary beneficiary (excluding those above 64 years, since they are generally covered by the government).
  • sex: The policy holder's gender, either male or female.
  • bmi: The body mass index (BMI), which provides a sense of how over- or under-weight a person is relative to their height. BMI is equal to weight (in kilograms) divided by height (in meters) squared. An ideal BMI is within the range of 18.5 to 24.9. A person with a BMI value within the range of 25 to 29.9 is considered overweight. A person with a BMI value above 30 is considered obese.
  • children: An integer indicating the number of children/ dependents covered by the insurance plan.
  • smoker: A yes or no categorical variable that indicates whether the insured regularly smokes tobacco.
  • region: The beneficiary's place of residence in the US, divided into four geographic regions: northeast, southeast, southwest, or northwest.
  • expense: total medical expenses charged to the plan for the calendar year

Using the numpy library analyze the data. In particular, read the data file (numpy.loadtxt()), produce the following analysis and store the results into a text file (numpy.savetxt()):

1. Mean, standard deviation and median of age.

2. Mean, standard deviation and median of BMI.

3. Mean, standard deviation and median of BMI grouped by sex.

4. Mean, standard deviation and median of BMI for smokers and non-smokers.

5. Mean, standard deviation and median of BMI grouped by region.

6. Mean, standard deviation and median of BMI of those who have more than 2 children.

How do the following factors affect BMI? Justify your comments with supporting descriptive statistics (mean, standard deviation and median).

1. Smoking habit

2. Region

3. Children

What are the primary reasons for the top 20% of the expenses? In particular, sort the data by expense, and compute the mean, and standard deviation of BMI and the mode of smoker and region. How do these values differ from the rest 80% of the population?

Note - Please make sure your code follows the Python programing style. Please make sure the code is well-commented.

Attachment:- Assignment & Data File.rar

Reference no: EM132389205

Questions Cloud

What will happen when two water molecules bump : What will happen when two water molecules bump into each other when the two oxygen atoms are facing each other (try it with the model)? Why?
When a structure that has evolved in one context : When a structure that has evolved in one context becomes co-opted for another purpose, this event is called exaptation.
How does this minimize photorespiration : In C4 how do plants achieve a high CO2 to O2 ratio in bundle sheath cells and how does this minimize photorespiration?
Name the enzyme responsible for the fixation of co2 : Name the enzyme responsible for the fixation of CO2 from the atmosphere, RuBP carboxylase or PEP carboxylase?
Analyze the data using the numpy library : Using the numpy library analyze the data. In particular, read the data file, produce the following analysis - Mean, standard deviation and median of age
Draw a chloroplast and label the structures : Draw a chloroplast and label the following structures, outer membrane, inner membrane, stroma, thylakoid, thylakoid membrane and granum.
What will happen when we reach our carrying capacity : What will happen when we reach our carrying capacity as a species?
How a positive response in a progesterone challenge result : Explain how a positive response in a progesterone challenge result would say about a females uterus and ovaries?
What is the most common cause of chronic pelvic pain : What is the most common cause of chronic pelvic pain and infertility in women of reproductive-age? How frequent is this disease?

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd