> dbinom(3, 15, 0.05) [1] 0.03073298
> dbinom(2, 15, 0.05) [1] 0.1347523
> dbinom(1, 15, 0.05) [1] 0.3657562
> dbinom(0, 15, 0.05) [1] 0.4632912
> pbinom(3, 15, 0.05) + pbinom(2, 15, 0.05) + + pbinom(1, 15, 0.05) + pbinom(0, 15, 0.05)This gives us
> # The R statement pbinom function computes the > # probability of 3 or fewer sucesses out of 15 > # when the probability of success is 0.05. > pbinom(3, 15, 0.05) [1] 0.9945327
-- If possible, make the treatments double blind.
p^ = S/n in SES = √np(1-p) is close to the true value of p.
> setwd("c:/workspace")
> getwd( )
[1] "c:/workspace"
> dir( )
[1] "bears-2024-roster.txt" "bears-2026-roster.txt" "ht-wt.txt"
[4] "laundry-detergent.txt" "nist-10.txt" "paper-thickness.txt"
> df <- read.csv("nist-10.txt")
> df$Weight
[1] 9.999591 9.999600 9.999594 9.999601 9.999598 9.999594 9.999599 9.999597
[9] 9.999599 9.999597 9.999602 9.999597 9.999593 9.999598 9.999599 9.999601
[17] 9.999600 9.999599 9.999595 9.999598 9.999592 9.999601 9.999601 9.999598
[25] 9.999601 9.999603 9.999593 9.999599 9.999601 9.999599 9.999597 9.999600
[33] 9.999590 9.999599 9.999593 9.999577 9.999594 9.999594 9.999598 9.999595
[41] 9.999595 9.999591 9.999601 9.999598 9.999593 9.999594 9.999587 9.999591
[49] 9.999596 9.999598 9.999596 9.999594 9.999593 9.999595 9.999589 9.999590
[57] 9.999590 9.999590 9.999599 9.999598 9.999596 9.999595 9.999608 9.999593
[65] 9.999594 9.999596 9.999597 9.999592 9.999596 9.999593 9.999588 9.999594
[73] 9.999591 9.999600 9.999592 9.999596 9.999599 9.999596 9.999592 9.999594
[81] 9.999592 9.999594 9.999599 9.999588 9.999607 9.999563 9.999582 9.999585
[89] 9.999596 9.999599 9.999599 9.999593 9.999588 9.999625 9.999591 9.999594
[97] 9.999602 9.999594 9.999597 9.999596
> t.test(df$Weight, mu=10)
One Sample t-test
data: df$Weight
t = -625.64, df = 99, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 10
95 percent confidence interval:
9.999594 9.999597
sample estimates:
mean of x
9.999595
The p-value is 2.2 × 10-15 so the evidence if overwhelming to reject H0.