0% found this document useful (0 votes)
317 views6 pages

MAS183 Assignment 4 Final

The document contains statistical analysis of data from 4 experiments: 1) A chi-squared test shows a significant difference in outcomes between standard and new hypertension drugs, rejecting the null hypothesis of no difference. 2) A chi-squared test of hypertension drug doses shows patient outcomes differ significantly between doses. The 40mg dose had the highest rates of no change but also improvement and worsening. 3) A linear regression finds no significant correlation between brain volume and IQ. Residuals are randomly distributed with potential normality issues. The null hypothesis of no correlation is not rejected. 4) In summary, the analyses found differences in drug outcomes, doses, but no relationship between brain size and intelligence contradicting

Uploaded by

Tekla Fabriczy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
317 views6 pages

MAS183 Assignment 4 Final

The document contains statistical analysis of data from 4 experiments: 1) A chi-squared test shows a significant difference in outcomes between standard and new hypertension drugs, rejecting the null hypothesis of no difference. 2) A chi-squared test of hypertension drug doses shows patient outcomes differ significantly between doses. The 40mg dose had the highest rates of no change but also improvement and worsening. 3) A linear regression finds no significant correlation between brain volume and IQ. Residuals are randomly distributed with potential normality issues. The null hypothesis of no correlation is not rejected. 4) In summary, the analyses found differences in drug outcomes, doses, but no relationship between brain size and intelligence contradicting

Uploaded by

Tekla Fabriczy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MAS183 Statistical data analysis

Assignment 4

1.
> obs = c(118,58,14,10)
> prob = c(0.5,0.25,0.1,0.15)
> Xsq = chisq.test(obs, p = prob)
> Xsq$observed
[1] 118 58 14 10
> Xsq$expected
[1] 100 50 20 30
> Xsq$residuals
[1] 1.800000 1.131371 -1.341641 -3.651484
> Xsq

Chi-squared test for given probabilities

data: obs
X-squared = 19.653, df = 3, p-value = 0.0002003

H0: The standard and new treatment have the same outcomes

H1: Outcomes differ between treatments

Significance level: 1%
Since all expected values are at least 5 and the hypertension patients were selected randomly, the
test statistic will approximately follow a χ2 distribution on 3 df.
With a P-value of 0.0002, we reject H0 at a 1% significance level. There is significant evidence that
there is a difference in outcome of the standard and new hypertension drug. The new drug seems to
be better, as the observed proportions are better than the expected proportions.

2.a,

Treatment will be the predictor and the change in condition will be response. Based on the
research question, the different treatments cause the changes in the patients’ conditions.
The treatment can cause changes in the patients’ condition, but different conditions do not
have an effect on treatment.

b,
Cell Contents
|-------------------------|
| Count |
| Expected Values |
| Row Percent |
| Std Residual |
|-------------------------|

Total Observations in Table: 520

| Conditions
Treatment | Improved | No change | Worse | Row Total |
-------------|-----------|-----------|-----------|-----------|
Placebo | 35 | 70 | 95 | 200 |
| 40.38 | 86.92 | 72.69 | |
| 17.50% | 35.00% | 47.50% | 38.46% |
| -0.85 | -1.82 | 2.62 | |
-------------|-----------|-----------|-----------|-----------|
20 mg | 62 | 76 | 62 | 200 |
| 40.38 | 86.92 | 72.69 | |
| 31.00% | 38.00% | 31.00% | 38.46% |
| 3.40 | -1.17 | -1.25 | |
-------------|-----------|-----------|-----------|-----------|
40 mg | 8 | 80 | 32 | 120 |
| 24.23 | 52.15 | 43.62 | |
| 6.67% | 66.67% | 26.67% | 23.08% |
| -3.30 | 3.86 | -1.76 | |
-------------|-----------|-----------|-----------|-----------|
Column Total | 105 | 226 | 189 | 520 |
-------------|-----------|-----------|-----------|-----------|

Statistics for All Table Factors

Pearson's Chi-squared test


------------------------------------------------------------
Chi^2 = 54.20628 d.f. = 4 p = 4.764416e-11

Minimum expected frequency: 24.23077

H0: Different doses have the same effect on the patient outcomes

H1: Patient outcomes differ between the different doses

Significance level: 1%

Since the expected values are at least 5, the test statistic will approximately follow a χ2 distribution
on 4 df, if the participants were randomly selected for the experiment.
The extremely small P-value indicates overwhelming evidence that there is a difference in outcome
between the used doses. Therefore, we reject H0 at 1% significance level. The dose of 40 mg has the
highest standard residuals (in case of improved and no change), but there are other high standard
residuals (placebo – worse, dose of 20 mg – improved). This may indicate that these values differ
from others.
The dose of 40 mg of the drug caused no change in most of the patients (67%) while there was only
7% of patients whose conditions improved and 27% of them got worse. In contrast, both placebo
and 20 mg dose of the drug resulted in lower percentage for no change (below 40%), and higher
percentages in case of the improved and worse conditions.

3.

a, i)

ii)
iii)
iv)

Call:
lm(formula = IQ ~ BrainV)

Residuals:
Min 1Q Median 3Q Max
-38.718 -18.870 9.529 16.373 27.069

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 24.18350 76.38158 0.317 0.755
BrainV 0.09884 0.08837 1.119 0.278

Residual standard error: 21.53 on 18 degrees of freedom


Multiple R-squared: 0.06499, Adjusted R-squared: 0.01305
F-statistic: 1.251 on 1 and 18 DF, p-value: 0.278

b,
Model is Brain volume = a + b × IQ + error, where errors are independent and normally distributed
with the same standard deviation.

c,

Overall, the scatterplot of brain volume and verbal IQ shows a very weak, but possibly positive linear
trend, however more likely seems to be a random variation. The residuals (negative and positive as
well) tend to be more on the left side on the plot, however since there is no defined pattern in the
residual plot, it is not reasonable to look at the independence of the residuals. Looking at the
distribution of the residuals, it does not seem to be consistent and to follow a normal distribution.
There is no residual beyond ± 2 standard deviation and the shape of the distribution is skewed. As
there are no residual beyond ± 2 standard deviation we do not assume any outliers, but there is no
residuals between 0.0 and 0.5 standard deviation. Overall, there are concerns with the distribution
assumption for the residuals which suggest that the linear model may not be appropriate. Perhaps
with a bigger sample size we could observe the data better or some other transformation of the data
is needed.

d,

H0: There is no correlation between intelligence and brain size (b = 0)

H1: Intelligence is related to brain size (b ≠ 0)

Significance level: 5%
Assuming that the regression model is appropriate, the P-value for the test of linear relationship is
0.275. Therefore, we do not reject the null hypothesis at 5% significance level as there is a significant
evidence that the intelligence is not related to the brain size.

e,

Predicted value is 24.1835 + 0.09884 x 870,000 = 86,014.98

95% prediction interval = 86,014.98 ± 2.101 x 21.53, or 85,969.75 to 86,060.22

f,
Based on the observation of data clearly there is no relation between intelligence and brain size. The
plots do not show any correlation.

You might also like