Description Usage Arguments Value Deprecated Function References See Also Examples

View source: R/infer-os-prop-test.R

`infer_os_prop_test`

compares proportion in one group to a
specified population proportion.

1 2 3 4 5 6 | ```
infer_os_prop_test(data, variable = NULL, prob = 0.5, phat = 0.5,
alternative = c("both", "less", "greater", "all"))
## Default S3 method:
infer_os_prop_test(data, variable = NULL, prob = 0.5,
phat = 0.5, alternative = c("both", "less", "greater", "all"))
``` |

`data` |
numeric vector of length 1 or a |

`variable` |
factor; column in |

`prob` |
hypothesised proportion |

`phat` |
observed proportion |

`alternative` |
a character string specifying the alternative hypothesis, must be one of "both" (default), "greater", "less" or "all". You can specify just the initial letter. |

`infer_os_prop_test`

returns an object of class `"infer_os_prop_test"`

.
An object of class `"infer_os_prop_test"`

is a list containing the
following components:

`n` |
number of observations |

`phat` |
proportion of 1's |

`p` |
assumed probability of success |

`z` |
z statistic |

`sig` |
p-value for z statistic |

`alt` |
alternative hypothesis |

`obs` |
observed number of 0's and 1's |

`exp` |
expected number of 0's and 1's |

`deviation` |
deviation of observed from expected |

`std` |
standardized resiudals |

`prop_test()`

has been deprecated. Instead use `infer_os_prop_test()`

.

Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.

1 2 3 4 5 | ```
# use as a calculator
infer_os_prop_test(200, prob = 0.5, phat = 0.3)
# using data set
infer_os_prop_test(hsb, female, prob = 0.5)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.