Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

In this challenge, you'll calculate the Student's tetest returning the test value and the p-value for two sets of variables, As in the previous challenge,

image text in transcribed
In this challenge, you'll calculate the Student's tetest returning the test value and the p-value for two sets of variables, As in the previous challenge, you'll use a preloaded DataFrame that contains information about medical costs in different regions of the country and across other demographics, including age, sex, BMI (body mass index), number of children, and smoker vs, non-smoker. For this challenge, you'll focus on evaluating the sets sex and charges, and sex and bmi. You'll also start with preloaded code that creates two separate DataFrames, each containing all the columns and rows for sex equal to male or fenale, and the resulting DataFrames are named df_mole and df_female, respectively, Your solution will use these new DataFrames. Also, you'll be assigning values to two variables at once, as you did in the previous challenge. 1. For the t-test between sex and charges, assign the test value to the variable tc and the p-value to pc. Print out both results. 2. For the t-test between sex and bmi, assign the test value to the variable tb and the p-value to pb. Print out both results. You'll notice that only one of them has a significant p-value (less than 0.05), and your solution should confirm that it is the test that evaluates charges, not bmi

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Explain the pages in white the expert taxes

Answered: 1 week ago