NEED HELP WRITING THE CODE STEP 4..
Step 3: Hypothesis Test for the Population Mean (I)
A relative skill level of 1420 represents a critically low skill level in the league. The management of your team has hypothesized that the average relative skill level of your team in the years 2013-2015 is greater than 1420. Test this claim using a 5% level of significance. For this test, assume that the population standard deviation for relative skill level is unknown. Make the following edits to the code block below:
1. Replace ??DATAFRAME_YOUR_TEAM?? with the name of your team's dataframe. See Step 2 for the name of your team's dataframe.
1. Replace ??RELATIVE_SKILL?? with the name of the variable for relative skill. See the table included in the Project Two instructions above to pick the variable name. Enclose this variable in single quotes.
For example, if the variable name is var2 then replace ??RELATIVE_SKILL?? with 'var2'.
1. Replace ??NULL_HYPOTHESIS_VALUE?? with the mean value of the relative skill under the null hypothesis.
After you are done with your edits, click the block of code below and hit the Run button above.
In [22]: import scipy.stats as st
# Mean relative skill level of your team mean_elo_your_team = your_team_df['elo_n'].mean()
print("Mean Relative Skill of your team in the years 2013 to 2015 =", round(me an_elo_your_team,2))
# Hypothesis Test
# ---- TODO: make your edits here ----
test_statistic, p_value = st.ttest_1samp(your_team_df['elo_n'], 1420)
print("Hypothesis Test for the Population Mean") print("Test Statistic =", round(test_statistic,2)) print("P-value =", round(p_value,4))
Mean Relative Skill of your team in the years 2013 to 2015 = 1347.75
Hypothesis Test for the Population Mean
Test Statistic = -11.97
P-value = 0.0
Step 4: Hypothesis Test for the Population Mean (II)
A team averaging 110 points is likely to do very well during the regular season. The coach of your team has hypothesized that your team scored at an average of less than 110 points in the years 2013-2015. Test this claim at a 1% level of significance. For this test, assume that the population standard deviation for relative skill level is unknown.
You are to write this code block yourself.
Use Step 3 to help you write this code block. Here is some information that will help you write this code block.
Reach out to your instructor if you need help.
Write your code in the code block section below. After you are done, click this block of code and hit the Run button above. Reach out to your instructor if you need more help with this step.
P value -
let’s toss the coin and calculate p- value ( probability
value).
Toss a coin 1st time and result is tail- P-value = 50% (as head and
tail have equal probability)
Toss a coin 2nd time and result is tail, now p-value = 50/2 =
25%
and similarly we Toss 6 consecutive time and got result as P-value
= 1.5% but we set our
significance level as 95% means 5% error rate we allow and here we
see we are beyond that level such as our null- hypothesis
does not hold good so we need to reject and propose that this coin
is a tricky coin which is actually.
import numpy as np
your_team_df = dataframe
expenditure = np.random.normal(your_team_df)
np.mean(expenditure)
from scipy.stats import ttest_1samp
import numpy as np
team_mean = np.mean(your_team_df)
print(team_mean)
tset, pval = ttest_1samp(team_mean, 110)
print(“p-values”,pval)
if pval < 0.05: # alpha value is 0.05 or 5%
print(" we are rejecting null hypothesis")
else:
print("we are accepting null hypothesis")
# function for calculating the t-test for two independent
samples
def independent_ttest(data1, data2, alpha):
# calculate means
mean1, mean2 = mean(data1), mean(data2)
# calculate standard errors
se1, se2 = sem(data1), sem(data2)
# standard error on the difference between the
samples
sed = sqrt(se1**2.0 + se2**2.0)
# calculate the t statistic
t_stat = (mean1 - mean2) / sed
# degrees of freedom
df = len(data1) + len(data2) - 2
# calculate the critical value
alpha = 0.05
cv = t.ppf(1.0 - alpha, df)
# calculate the p-value
p = (1.0 - t.cdf(abs(t_stat), df)) * 2.0
# return everything
return t_stat, df, cv, p
NEED HELP WRITING THE CODE STEP 4.. Step 3: Hypothesis Test for the Population Mean (I)...
QUESTION: What is the null value and alternative value for steps 6 and 7? Step 6: Perform hypothesis test for population proportion It is claimed that 67% of the months have highest monthly maximum temperatures above 19 degrees celsius (EMXT>190). Is there sufficient evidence to suggest that the proportion is 67%? 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....
need help with number A
Suppose you want to test the claim that a population mean equals 37. (a) State the null hypothesis. (b) State the alternate hypothesis if you have no information regarding how the population mean might differ from 37. (e) State the alternative hypothesis If you belleve (based on experience or past studies) that the population mean may exceed 37. (d) State the alternative hypothesis If you believe (based on experience or past studies that the population...
You conduct a hypothesis test for the population mean. After you calculate the t test statistic, you find that your p-value = 0.04. Using alpha (a) = 0.01 level of significance, what is your decision regarding the null hypothesis? (either reject Ho and accept Ha, or fail to reject Ho)
3. Testing a population mean The test statistic (Chapter 11) Aa Aa You conduct a hypothesis test about a population mean u with the following null and alternative hypotheses: Ho: u-25.8 H1: <25.8 Suppose that the population standard deviation has a known value of a observations, which provides a sample mean of % 30.7. 17.8. You obtain a sample of n =62 Since the sample size large enough, you assume that the sample mean X follows a normal distribution. Let...
Hi, I need help writing a code for this. The language is python 3, and we cannot use things like break, continue, exit(), lambda, map, filter, raise, try, except, and assert in our code. Thank you! We must write a function called "binary_to_decimal(binary_number)" that takes a string for a binary number and output the decimal integer for that number. The solution, aka the code, MUST contain a for loop of this form (power is an integer variable you define earlier):...
Use the link in the Jupyter Notebook activity to access your
Python script. Once you have made your calculations, complete this
discussion. The script will output answers to the questions given
below. You must attach your Python script output as an HTML file
and respond to the questions below.
In this discussion, you will apply the statistical concepts and
techniques covered in this week's reading about hypothesis testing
for the difference between two population proportions. In the
previous week’s discussion,...
1. You want to test whether you can reject the null hypothesis that a population mean is greater than or equal to 10. To do this, you collect a random sample of size 500 from the population, and you calculate that the sample mean and sample standard deviation are 8.6 and s, respectively. Which of the following is true? a. If s is any value between 11 and 13, you can reject the null hypothesis at the 5% significance level....
mean of population = 1.68
I already have the null and the alternative hypothesis
I only need help with 2, 4 and 5
Instructions: For this discssion, everyone in the class wil telme how maxy siblings they have Use the chart below to gather this data. Place a ckeck mark next in the appropriate "Namber of Sblings" row each time a class member mentions that umber For example, if someone has three siblings then put vin the row or Three...
You set up a two-sided hypothesis test for a population mean μ with a null hypothesis of H0:μ=100. You chose a significance level of α=0.05. The p-value calculated from the data is 0.12, and hence you failed to reject the null hypothesis. Suppose that after your analysis was completed and published, an expert informed you that the true value of μ is 104. How would you describe the result of your analysis? A) A Type 1 error was made because...
(a) Test the hypothesis that each sample comes from a population with the same mean at the a = 0.05 level of significance. That is, test Ho: My = H2 = 43. P-value = (Round to three decimal places as needed.) Choose the correct conclusion below. Do not reject the null hypothesis. Reject the null hypothesis. 0 - (b) If you rejected the null hypothesis in part (a), use Tukey's test to determine which pairwise means differ using a familywise...