
David B. answered 08/22/21
Math and Statistics need not be scary
The most accurate way to test this would be to use the binomial distribution and its conjugate prior, the beta distribution. With the null hypothesis that p(s) [where s represents the stock market being 'up' at the end of the year] is equal to .5. the chances that we would see this distribution (29 out of 34 ) would be 1.12 x 10 -5 . (math not shown as calculating the inverse beta distribution is non-trivial. There is software out there for this )
HOWEVER, chances are you are looking for the simplified normal approximation for testing the mean. Let. n = 34, s = 29, p (or pa) is approximately estimated as 29/34 or .8529. q (or 1-p) is 5/34 or .1471. (note: p0 = .5)
Variance = pq. or .1254
Standard deviation (sd or σ)= .3542
standard error (σmean) = σ/√34 = .0607
A) what is the chance (based on history) that in a year with the market 'up' at the end of January will be up at the end of the year. Answer - rho or p. (.8529)
B).what is the chance that 29 out of 34 years would be up if rho (p) is actually .5?
to answer this we need to compare means. (.5 with .8529) using a normal approximation.
Calculating the Ztest = (.8529-.5000)/.0607 [ (pa - p0)/σmean] = 5.8138
When using the normal approximation we use a standardized normal distribution or Z distribution to determine the answer by comparing the calculated Z value to the Z distribution.
Using the normal distribution (calculator, table, on-line calculator) we find that the p value for the hypothesis test (i.e. that P(Z) >= 5.8138. [or P(ρ) >= .8529] is equal to 3.06 x 10 -9
C) Assuming the question is what is the mean number of years the market is up assuming p = .5 and a time frame of 34. This would be 34 x .5 or 17years
D) based on the data given, the January theory would be accepted as true as the chances of seeing the observed results if Ho were true is <= .00000000309
The chances of a random market year starting with January up but finishing down at the end of the year would would be .1471, The chances of a random market year finishing up would be .8529, the chances for being the same are not calculable with given information. [unstated assumptions or definitions about what is meant by ending the same must be defined first].
note: as with all answers, the results depend on underlying assumptions. For example, if in question D we assume that what was being asked was : What are the chances , assuming a binary distribution with a p value of .8529, that a 34 year period would have a) less than 29 up years up, exactly 29 years up, and more than 29 years up the answers would be .3839, .1900, .4261. This is not the same as the assumptions made in the answer above. So, beware of your assumptions.