Skip to content

Commit 6bcbac7

Browse files
committed
adding p-values
1 parent 0e41b87 commit 6bcbac7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lectures/inference/inference.Rmd

+12-4
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ mu
385385
sigma/sqrt(N)
386386
```
387387

388-
3. What is the probability that our estimate is within one inch of the population avergae?
388+
3. What is the probability that our estimate is within one inch of the population average?
389389

390390
Let's call the sample average
391391

@@ -654,9 +654,9 @@ abline(0,1)
654654

655655
## p-values
656656

657-
p-values are ubiquotous in the scientific literature. They are related to confidence interval so we introduce the concept here.
657+
p-values are ubiquitous in the scientific literature. They are related to confidence interval so we introduce the concept here.
658658

659-
Let's consider the blue and red beads. Suppose that rather than wanting an estimate of the percent of blue beads I am more interested in the question are ther more blue beads or red beads.
659+
Let's consider the blue and red beads. Suppose that rather than wanting an estimate of the percent of blue beads I am more interested in the question are there more blue beads or red beads.
660660

661661
Suppose we take a random sample of $N=100$ and we observe 53 blue beads. This seems to be pointing to their being more blue than red. However, as data scientists we need to be skeptical. We know there is chance involved in this process and we could get a 53 even when the proportions of red and blue are the same. We call this a _null hypothesis_. The null hypothesis is the skeptics hypothesis: the proportion of blue beads $p$ is 0.5. We have observed a random variable $\hat{p} = 0.53$ and the p-value is the answer to the question how likely is it to see a value this large, when the null hypothesis is true. So we write
662662

@@ -683,7 +683,15 @@ So we do in fact have reason to be a skeptics. By constructing a p-value we see
683683

684684

685685
Assessment:
686-
Later we see an $\hat{p}=53.0347$ that was obtained with an $N=4397$. What is the p-value?
686+
If $\hat{p}=51$ and $N=10000$. What is the p-value?
687+
688+
We can show that if a $x \times 100\%$ confidence interval does not include 0, then the p-value must be smaller than $1-x$. So they provide related information. However, the confidence interval is always more informative as it gives information of the size of the estimate.
689+
690+
Assessment:
691+
Suppose you are comparing average test scores from two school districts. You have exams from a random sample of 10000. The p-value for the difference in average scores is 0.01. Should we change the curriculum of the district with highly significant statistical differences?
692+
693+
694+
687695

688696

689697

0 commit comments

Comments
 (0)