problem-8.2

problem-8.2  We tabulate to get the counts.
> table(samhda$marijuana)
marijuana
  1   2
309 281
    
The hypothesis test is between
H0: p = 0.5,    HA: p > 0.5.
The p-value is given by
> x = 309; n = 309 + 281
> prop.test(x,n,p=.5,alt="greater")

        1-sample proportions test with continuity correction

data:  x out of n, null probability 0.5
X-squared = 1.236, df = 1, p-value = 0.1332
alternative hypothesis: true p is greater than 0.5
...
    
which is a small, but not significant p-value.