Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Apply an ANOVA test on supp and dose to check whether the len isdiffers with supp and/or with dose. we will have to compare betweenOJ

Apply an ANOVA test on supp and dose to check whether the len isdiffers with supp and/or with dose. we will have to compare betweenOJ and VC. also, 0.5, 1.0, and 2.0. and we will use res =st.f_oneway(vector1, vector2) to apply ANOVA. before doing that wewill have to prepare and filter the data (according to dose orsupp) then putting the data in new variable)

lensuppdose
2.4OJ0.5
3.5VC1.0
3OJ0.5
5VC2.0

import numpy as np

import pandas as pd

import scipy.stats as st

import matplotlib.pyplot as plt

import os

%matplotlib inline

Answer the following questions by providing Python code:

We will use the dataset "data_ToothGrowth.csv".

  • len = teeth length.
  • supp = supplementary type with two possible values: VC (vitaminC) or OJ (orange juice).
  • dose (mgr/day) = dosage per day with three possible values:0.5, 1.0, 2.0.

df = pd.read_csv('data_ToothGrowth.csv', header='infer')

1). Perform the EDA and ANOVA (?= 5%) with the 'supp'variable.
Summarize the result.

i) # Categories of 'supp'.

ii)

# Group by category.

iii)

# Multiple Boxplots.

iv)

# ANOVA.

iiv)

# Result summary.

2). Perform the EDA and ANOVA (?= 5%) with the 'dose'variable.
Summarize the result.

i)

# Categories of 'dose'.

ii)

# Group by category.

iii)

# Multiple Boxplots.

v)

# ANOVA.

iv)

# Result summary.

Answer by using Python

Step by Step Solution

3.44 Rating (154 Votes )

There are 3 Steps involved in it

Step: 1

To perform the EDA and ANOVA on the supp variable and the dose variable well follow these steps Load the data and perform the EDA for supp Perform ANOVA for supp and summarize the results Perform the ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Introduction To Statistical Investigations

Authors: Beth L.Chance, George W.Cobb, Allan J.Rossman Nathan Tintle, Todd Swanson Soma Roy

1st Edition

1118172140, 978-1118172148

More Books

Students also viewed these Programming questions

Question

19. What does fMRI measure?

Answered: 1 week ago