#2
It is best to use a one-tailed p-value for x^2 and |x| because they never have negative values, because they are squared or absolute value, therefore you only need to test for the possibility of a relationship on the right side. It will be skewed right, and therefore you should use a one tailed p-value. On the other hand, you should use a two-sided p-value for relative risk because it takes into account effect size and you should make a confidence interval from the data. You need a two sided p-value to make the confidence interval. Also, this data will be more bell-shaped so it is important to look for the possibility of a relationship on both the left and the right. It will be centered around 1 and can have positive and negative values.
#5
Even though correlation does not mean causation, we still care about it because it sometimes helps us to predict the future. It allows us to do so without knowing the underlaying cause of the trend. This is important so we can determine what will happen next even if we don't know why.
#6
While the study shows that there is a very high correlation between professors' salaries and the price of alcohol over the last 25 years, we can not draw a conclusion about causation. Correlation does not mean causation. One possible explanation is that as the value of money decreased over the course of the last 25 years, universities had to raise the salaries of their professors so they can live with a good quality of life and stores had to increase the cost of alcohol to maintain good profit margins. Another explanation could be that the demand for alcohol has gone up in the last 25 years so stores are charging more for it. This is a very plausible answer, as prices and salaries do increase over time. At the same time, professors salaries are also increasing because there is more demand because more people are going to college. This is also plausible, however less likely than the first explanation. Finally, professors have been demanding higher salaries over the course of the last 25 years while alcohol producers have gotten greedy and upped their prices. This could also be true, but is less likely than both the first two explanations.
#7 part a
The independent variable is whether or not the patient received sterile or non sterile treatment. The dependent variable is whether or not the patient died. Both of these variables are categorical.
#7 part c
The null hypothesis is that there is no difference in how many people survive if they are treated with the sterile process or the non-sterile process.
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-15-c6a863482639> in <module>
5 results= np.zeros(Integer(10000))
6 for i in range(Integer(10000)):
----> 7 sterile_res= np.random.choice(ster_box, Sterile)
8 control_res= np.random.choice(cont_box, Control)
9 outcome= np.zeros({Integer(2), Integer(2)})
NameError: name 'Sterile' is not defined
Ice Breakup Day of Year | Years Since 1900 | Year | |
---|---|---|---|
0 | 119.479 | 17 | 1917 |
1 | 130.398 | 18 | 1918 |
2 | 122.606 | 19 | 1919 |
3 | 131.448 | 20 | 1920 |
4 | 130.279 | 21 | 1921 |
... | ... | ... | ... |
98 | 113.601 | 115 | 2015 |
99 | 112.652 | 116 | 2016 |
100 | 120.500 | 117 | 2017 |
101 | 121.554 | 118 | 2018 |
102 | 104.014 | 119 | 2019 |
103 rows × 3 columns
Temperature | Initial Reaction Rate | |
---|---|---|
0 | 298.0 | 0.05 |
1 | 303.0 | 0.07 |
2 | 308.0 | 0.12 |
3 | 313.0 | 0.20 |
4 | 313.0 | 0.18 |
5 | 318.0 | 0.34 |
6 | 323.0 | 0.48 |
7 | 328.0 | 0.79 |
8 | 333.0 | 0.98 |
9 | 335.0 | 1.02 |
10 | 333.5 | 1.04 |
11 | 338.0 | 1.10 |
12 | 343.0 | 0.98 |
13 | 298.0 | 0.04 |
14 | 343.7 | 1.00 |
15 | 353.0 | 0.53 |
16 | 353.0 | 0.58 |
17 | 353.0 | 0.61 |
18 | 338.0 | 1.07 |
19 | 348.0 | 0.74 |
20 | 348.0 | 0.72 |