Question: how to Complete The table for the two citys completed in codio Hypothesis Tests (1-sample and 2-sample) listed below i have attatched the completed codio
how to Complete The table for the two citys completed in codio Hypothesis Tests (1-sample and 2-sample) listed below i have attatched the completed codio assignments however I am unable to table the information and properly explain below. PLease Help!!!
Statistic
Value
Test Statistics
9.9999
*Round off to 4 decimal places
P-Value
9.9999
*Round off to 4 decimal places
.
The Month of the year reported as integers (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).
6. Part II: Hypothesis Testing for the Difference of Two Population Proportions (Scenario B)
Step 2: Perform hypothesis test for the difference of two population proportions (cityA)
It is claimed that the proportion with power generation over 44.4 kWh (cityA > 44.4) is the same for the month of June (Month=6) and July (Month=7). 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:
####### 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 = solarkwh.loc[solarkwh['Month'] == 6 ]['cityA'].count()
#n2 = solarkwh.loc[solarkwh['Month'] == 7 ]['cityA'].count()
#x1 = (solarkwh.loc[solarkwh['Month'] == 6 ]['cityA'] > 44.4).values.sum()
#x2 = (solarkwh.loc[solarkwh['Month'] == 7 ]['cityA'] > 44.4).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 (cityB)
It is claimed that the proportion with power generation over 55.2 kWh (cityB > 55.2) is the same for the month of June (Month=6) and July (Month=7). 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:
####### 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 = solarkwh.loc[solarkwh['Month'] == 6 ]['cityB'].count()
#n2 = solarkwh.loc[solarkwh['Month'] == 7 ]['cityB'].count()
#x1 = (solarkwh.loc[solarkwh['Month'] == 6 ]['cityB'] > 55.2).values.sum()
#x2 = (solarkwh.loc[solarkwh['Month'] == 7 ]['cityB'] > 55.2).values.sum()
#counts = [x1, x2]
#n = [n1, n2]
#print (proportions_ztest(counts, n))
#print ('')
7. Part II: Hypothesis Testing for the Difference of Two Population Means (Scenario B)
Step 4: Perform hypothesis test for the difference of two population means (cityA)
It is claimed that the average power generation for July is not the same as for August for City A. Test this claim using a hypothesis test at 5% 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:
####### 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 = solarkwh.loc[solarkwh['Month'] == 7 ]['cityA']
aug_data = solarkwh.loc[solarkwh['Month'] == 8 ]['cityA']
print (st.ttest_ind(jul_data, aug_data, equal_var=False))
print ('')
Step 5: Perform hypothesis test for the difference of two population means (cityB)
It is claimed that the average power generation for February is less than August for City B. 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:
####### 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 = solarkwh.loc[solarkwh['Month'] == 2 ]['cityB']
aug_data = solarkwh.loc[solarkwh['Month'] == 8 ]['cityB']
print (st.ttest_ind(feb_data, aug_data, equal_var=False))
print ('')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
