Question: In your initial post, address the following items: convert the array into a dataframe with the column name diameters using pandas library diameters _ sample
In your initial post, address the following items: convert the array into a dataframe with the column name "diameters" using pandas library
diameterssampledf pdDataFramediameterssample columnsdiameters
diameterssampledf diameterssampledfroundprintDiameters data frame of the first sample showing only the first five observations
printdiameterssampledfhead
print
printDiameters data frame of the second sample showing only the first five observations
printdiameterssampledfhead
Diameters data frame of the first sample showing only the first five observations
Diameters data frame of the second sample showing only the first five observations
Step : Performing hypothesis test for the difference in population proportions
The ztest for proportions can be used to test for the difference in proportions. The proportionsztest method in statsmodels.stats. proportion submodule runs
this test. The input to this method is a list of counts meeting a certain condition given in the problem statement and a list of sample sizes for the two samples.
Counts Python list that is assigned the number of observations in each sample with diameter values less than
Python list that is assigned the total number of observations in each sample.
Click the block of code below and hit the Run button above. Click the block of code below and hit the Run button above.number of observations in the first sample with diameter values less than
count lendiameterssampledfdiameterssampledfdiameterscount lendiameterssampledfdiameterssampledfdiameterscounts count countn lendiameterssampledfn lendiameterssampledfn n nteststatistic, pvalue proportionsztestcounts n
printteststatistic roundteststatistic,
printtwo tailed pvalue roundpvalue,
teststatistic
two tailed pvalue End of initial post
Attach the HTML output to your initial post in the Module Four discussion. The HTML output can be downloaded by clicking File, then Download as then
HTML Be sure to answer all questions about this activity in the Module Four discussion.
Define the null and alternative hypotheses in mathematical
terms as well as in words.
Identify the level of significance.
Include the test statistic and the value. See Step in the
Python script. Note that Python methods return two tailed P
values. You must report the correct P value based on the
alternative hypothesis.
Provide a conclusion and interpretation of the test: Should the
null hypothesis be rejected? Why or why not?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
