Print z-Test Results
z_results(x)Printed output of the z-test results including test type, hypotheses, z-value, and p-value.
library(mosaic)
#>
#> The 'mosaic' package masks several functions from core packages in order to add
#> additional features. The original behavior of these functions should not be affected by this.
#>
#> Attaching package: ‘mosaic’
#> The following objects are masked from ‘package:dplyr’:
#>
#> count, do, tally
#> The following object is masked from ‘package:Matrix’:
#>
#> mean
#> The following object is masked from ‘package:ggplot2’:
#>
#> stat
#> The following objects are masked from ‘package:stats’:
#>
#> IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
#> quantile, sd, t.test, var
#> The following objects are masked from ‘package:base’:
#>
#> max, mean, min, prod, range, sample, sum
my_z = prop_test(x = faithful$eruptions > 3, alternative = "less")
z_results(my_z)
#>
#> --------------------------------------------------
#> 1-sample proportions test with continuity correction
#> --------------------------------------------------
#>
#> H[0]: pi = 0.5
#> H[A]: pi < 0.5
#> z = 4.668811
#> p = 0.9999985
#>
#> --------------------------------------------------