R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

Chapter 10 Statistical Inferences About Two Populations

  1.Test hypotheses and develop confidence intervals about the difference in two means with known population variances using the z statistic.
  2.Test hypotheses and develop confidence intervals about the difference in two means of independent samples with unknown population variances using the t test.
  3.Test hypotheses and develop confidence intervals about the difference in two dependent populations.
  4.Test hypotheses and develop confidence intervals about the difference in two population proportions.
  5.Test hypotheses about the difference in two population variances using the F distribution.

10.1 z Statistic (Population Variances Known)

Hypothesis Testing and Confidence Intervals About the Difference in Two Means Using the z Statistic (Population Variances Known)

Video notes of 10.1

Estimation (Confidence interval)

1 sample (Chapter 8)

Mean
  • \(\sigma\) Know
    • z test (8.1)
  • \(\sigma\) Unknow
    • t (8.2)
Proportion
  • z (8.3)
Variance
  • \(\chi^2\) (8.4)

2 samples (Chapter 10)

Means
  • Independent
    • Variance Know z (10.1)
    • Variance Unknow t (10.2)
  • Dependent
    • t (10.3)
Proportions
  • z (10.4)

Hypothesis test

1 Sample (Chapter 9)

  • mean
    • \(\sigma\) Known
      • z (9.2)
    • \(\sigma\) Unknown
      • t (9.3)
  • Proportion
    • z (9.4)
  • Variance
    • \(\chi^2\) (9.5)

2 Samples (Chapter 10 & 13)

  • Means
    • Indepedent Samples
      • Interval Ratio level of Data
        • Population Variance Known
          • z test (10.1)
        • Population Variance Unknown
          • t test (10.2)
      • Ordinal level of Data
        • Mann–Whitney U test (13.2, Nonparametric test)
    • Dependent Samples
      • Interval Ratio level of Data
        • t test (10.3)
      • Ordinal level of Data
        • Wilcoxon Matched-Pair test (13.3, Nonparametric test)
  • Proportions
    • z test (10.4)
  • Variance
    • f statistic (10.5)
>=3 Samples (Chapter 11 & 13)
  • To be added

Generic Steps

  • Confidence Interval or Hypothesis Test?
  • Samples? (1, 2, or \(\ge3\)?)
  • Mean, Proportion or Variance?
    • Mean
      • \(\sigma\) Known or Unknown
    • What level of data do we have?

Youtube video, paired test, presidents height differences

v <- c(19, -12, 8, 0, 1)
dbar = mean(v)
s_d = round(sd(v), 1)
n = length(v)
df = n - 1
t = round(dbar/(s_d/n^.5), 3) # p value
t_.5alp = round(qt(.05,df), 3)
E = round(t_.5alp * s_d / n^.5, 4)
dbar + E
## [1] -7.6694
dbar - E
## [1] 14.0694
t_.5alp
## [1] -2.132
t
## [1] 0.628

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.