Вы находитесь на странице: 1из 8

Final Project: 4650

Kimberly Anderson Derek Dzik Alex Pax Chris Scarborough




Introduction

The first objective of this project is to complete problem 37 out of the textbook that deals with
a study on the effects of stelazine on schizophrenia patients. The Second objective is to analyze
stock return data for McDonalds and Halliburton by method of maximum likelihood and
Bayesian analysis.

Problem 37

Paired t-test

We looked at a study completed by Stanley and Walton who ran a controlled clinical
trial to better understand the effect of stelazine on schizophrenics. The trial was completed
using two closed wards and the patients were paired based on age, length of time in the
hospital, and score on a behavior rating sheet. One person was given stelazine and the other
took a placebo drug. In order to look at the effect of stelazine in each of the wards, we
completed a paired t-test. Our null hypothesis is that stelazine did not increase the
improvement in the patients behavioral rating scores. In Ward A, first we computed the
difference between the behavioral rating scores for stelazine (Stelazine After Stelazine
Before) and then did the same for the placebo. Then we subtracted the difference in the
placebo from the difference in the stelazine to compute D. For Ward A, we computed the
average of D to be approximately 0.49. Using the variance formula,
()



we computed the variance to be approximately 0.074753. We computed the t-statistic to be
approximately 1.808439. Using an alpha of 0.05 and 8 degrees of freedom, we found critical
value to be 1.8595. Since our t-statistic is less than our critical value, we do not reject the null
hypothesis. There is insufficient evidence to conclude that stelazine increased behavioral rating
scores in Ward A. We then repeated the process for Ward B. We computed a t-statistic of
approximately 1.3568 and a critical value of 1.94318. By the same argument we fail to reject
the null hypothesis in Ward B.

In conclusion, in both of the wards, stelazine is not associated with improvement in the
patients scores.

Two Sample t-test

When we compared the wards to see if there was any difference in improvement
between them, we used a 2-sample t-test. We have two different null hypotheses, one for the
comparison of stelazine in Ward A and Ward B and one where we compared the effect of
placebos between wards. For both categories, stelazine and placebo, our null hypothesis is that
there is no difference between wards. For stelazine, we computed the averages of the
differences between each patient in Ward A and Ward B, respectively. We used the variance
formula,



we computed the variance of stelazine in Ward A to be approximately 0.389 and the variance of
stelazine in Ward B to be about 0.088. Using the formula,



we computed a t-statistic of 2.72879. To get the degrees of freedom of 12, we used the
formula,

(



Using an alpha of 0.05, we found a critical value of 2.1788. So, since our t-statistic is greater
than our critical value, we reject the null hypothesis. So, there is evidence that there is a
difference between the wards in the stelazine group. Following the same process for the
placebo groups, our t-statistic was 1.59 with 14 degrees of freedom and our critical value was
2.15. In conclusion we fail to reject our null hypothesis and claim that there is no difference in
placebo groups between wards.

Stock Analysis

We are analyzing the monthly stock returns for McDonalds and Halliburton from 1975 through
1999.We are using two different methods to analyze the data. In the first method we will fit the
normal distributions to the return data to obtain the maximum likelihood estimates of the
mean and variance of the returns, and construct a 95% confidence interval for the mean
returns. Second, we will perform a Bayesian analysis of the data sets by considering the case of
unknown mean and known variance and the case of known mean and unknown variance,
where we will use the prior distributions to derive the exact normalizing constants.

We feel justified in assuming that McDonalds and Halliburtons monthly stock returns are
normally distributed from examining the following histograms of the given data.



Maximum Likelihood Estimates

In this part we will fit the normal distributions to the return data of stocks to obtain the
maximum likelihood estimates of the mean and variance of the returns for both McDonalds
and Halliburton. Also we will construct a 95% confidence interval for our estimates.

We know the maximum likelihood estimate for the mean is:

. So we simply take the


sample average of the stock returns. To obtain the maximum likelihood estimate of the
variance we know the formula is:

. We applied this formula to the


data using the sample average we obtained from the previous step. Once we calculated our
estimates, we calculated a 95% confidence interval by

95% C.I. Lower


Bound
95% C.I. Upper
Bound
McDonalds .016421 .0043374 .00092522 .0239158
Halliburton .011017 .0086246 .00044776 .0215865

Bayesian Parameter Estimation

In this part we are using Bayesian methods to estimate the mean and variance of the stock
return data.

First we consider the case of unknown mean and known variance. Instead of actually
knowing the variance we will use the MLE of the variance to stand in for the known quantity.
In doing our analyses we must first make assumptions about the distribution of the mean
return per month. We assume that the prior means for McDonalds and Halliburton are
normally distributed and from our intuition we can say that Halliburton and McDonald have the
following means and standard deviations:


Assumed Mean Assumed Standard Deviation
McDonalds .03 .03
Halliburtion .01 .03




This is perhaps the most difficult part to justify, but we felt that these were a reasonable
mean and standard deviation to assume. Next we applied these values to the Bayesian estimate
formula for the mean obtained by the following derivation:

) (

)

where,





In order for our posterior distribution to integrate to 1 we notice that the constant of
proportionality must be:

, so that our posterior distribution is:




The following table summarizes our results:

c
McDonalds 230.5516 .03 1111.11 70276.5928 .0166352 105.75853
Halliburton 115.9443 .01 1111.11 35894.4046 .0109856 75.58288


Now in the case of known mean and unknown variance we assume that the mean of the
normal distribution is known. In this case we use the MLE to stand in for the known mean.
Also among our assumptions is that the prior precision is gamma distributed with
parameters and . We need only to make assumptions about the mean and spread of this
distribution to make educated guesses about their values. If we assume the mean variance
among monthly stock returns is .01 then the mean for the gamma distributed precision will be
1/

= 100. Remember that the mean of a gamma distribution is / . We now have a fixed
ratio describing the relationship between the two parameters. We next recognize that the
variance for this distribution is /
2
. So the smaller is the larger the variance and vice versa.
To keep our assumptions conservative we choose the following and for Halliburton and
McDonalds


0

McDonalds .1 100 .25 25
Halliburton .1 100 .01 1



Since we are fairly more confident in our McDonalds assumptions we chose a larger
than with Halliburton. Once this is chosen our is determined. Now with these and the
text derives the following:



This shows us that the posterior distribution is proportional to a gamma distribution
with:



In order for our posterior distribution to integrate to 1 we notice that the constant of
proportionality must be:

, so that the posterior distribution is:





Hence the expected value for the posterior precision,

. Or we could say
the expected value for the posterior variance,

. This is our Bayesian estimator.


The following is a table of our results of the Bayesian analysis:

c
McDonalds 25 175 .25 ~.25 .00143 6.79E-422
Halliburton 1 151 .01 ~.01 .000067 2.2E-564

So we can see that the

changes significantly after updating our model.



Conclusion

We conclude by comparing our Bayesian results with those obtained using the Method
of Maximum Likelihood. Let us summarize with a table:


McDonalds .01642 .01664 .00434 .00143
Halliburton .01102 .01099 .00045 .000067

There is a strong agreement between the two different estimators for the mean,
however the Bayesian results are much different in estimating the variance. Whether using the
MLE or the Bayesian estimator, our stock recommendation would be dependent on a persons
risk aversion. McDonalds has a higher potential for returns, given by its larger mean, than
Halliburton. However, Halliburton can be considered a less risky investment because its
variance from month to month is significantly smaller than McDonalds. Whether you prefer
the Bayesian estimate or the MLE, this advice is the same.

Вам также может понравиться