Plot z-Distribution and Shaded p-Value
plot_z_dist(x, shade_p_value = TRUE)
Arguments
- x
prop.test() or prop_test() object
- shade_p_value
Logical value indicating whether to shade the area under the curve
corresponding to the p-value. Default is TRUE.
Value
Plot of the z-distribution. If shade_p_value=TRUE, the area under the curve
corresponding to the p-value will also be shaded.
Examples
heads <- rbinom(1, size = 100, prob = .5)
my_z = prop.test(heads, 100)
plot_z_dist(my_z)