This question has been answered
Question

It is claimed that the proportion with rice production over 209,500

cwt (Company2 > 209500.0) is the same for the month of March (Month=3) and October (Month=10). Test this claim using a hypothesis test at 1% level of significance. In order to perform this function, you need to make the appropriate modifications to the provided script. In other words, you should:
Uncomment lines 27 - 35 Replace ???DATASET_NAME??? with production Replace '???VARIABLE_NAME???' with the variable 'Company2' Replace ???Month1??? with the appropriate value Replace ???Month2??? with the appropriate value Replace ???Xvalue??? with the appropriate value Part II: Hypothesis Testing for the Difference of Two Population Proportions (Scenario C)
In Milestone2.py file, perform hypothesis test for the difference of two population proportions for Company1 and Company2.
####### Milestone 2 Python Script
import pandas as pd
import scipy.stats as st
from snhu_MAT243 import prop_1samp_ztest
from snhu_MAT243 import means_1samp_ttest
from statsmodels.stats.proportion import proportions_ztest


##Step 1: Import your data set
##-----------------------------------------------------------------------------
#???DATASET_NAME??? = pd.read_csv('???FILE_NAME???')
####### Step 2: Perform hypothesis test for the difference of two population proportions
##-------------------------------------------------------------------------------------------------
# print ('Hypothesis test for the difference of two population proportions - Step 2')
# n1 = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month1???]['???VARIABLE_NAME???'].count()
# n2 = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month2???]['???VARIABLE_NAME???'].count()
# x1 = (???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month1???]['???VARIABLE_NAME???'] > ???Xvalue???).values.sum()
# x2 = (???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month2???]['???VARIABLE_NAME???'] > ???Xvalue???).values.sum()
# counts = [x1, x2]
# n = [n1, n2]
# print (proportions_ztest(counts, n))
# print ('')
####### Step 3: Perform hypothesis test for the difference of two population proportions
##-------------------------------------------------------------------------------------------------
# print ('Hypothesis test for the difference of two population proportions - Step 3')
# n1 = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month1???]['???VARIABLE_NAME???'].count()
# n2 = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month2???]['???VARIABLE_NAME???'].count()
# x1 = (???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month1???]['???VARIABLE_NAME???'] > ???Xvalue???).values.sum()
# x2 = (???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month2???]['???VARIABLE_NAME???'] > ???Xvalue???).values.sum()
# counts = [x1, x2]
# n = [n1, n2]
# print (proportions_ztest(counts, n))
# print ('')
####### Step 4: Perform hypothesis test for the difference of two population means
##----------------------------------------------------------------------------------
# print ('Hypothesis test for the difference of two population means - Step 4')
# jul_data = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month1???]['???VARIABLE_NAME???']
# aug_data = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month2???]['???VARIABLE_NAME???']
# print (st.ttest_ind(jul_data, aug_data, equal_var=False))
# print ('')


####### Step 5: Perform hypothesis test for the difference of two population means
##----------------------------------------------------------------------------------
# print ('Hypothesis test for the difference of two population means - Step 5')
# feb_data = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month1???]['???VARIABLE_NAME???']
# aug_data = ???DATASET_NAME???.loc[???DATASET_NAME???['Month'] == ???Month2???]['???VARIABLE_NAME???']
# print (st.ttest_ind(feb_data, aug_data, equal_var=False))
# print ('')

Answered by Expert Tutors
Step-by-step explanation
It is claimed that the proportion with rice production over 209,500 cwt (Company2 > 209500.0) is the same for the month of March (Month=3) and
Get unstuck

321,403 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses