| Library: | tware |
| See also: | twpvalue twnormalize twclt twpearson tw1d twlinreg |
| Quantlet: | twrandomsample | |
| Description: | the teachware quantlet twrandomsample asks for a distribution of the numbers {1, 2, 3, 4}, displays a bar chart of the entered values and calculates a test for H0: p{2,3} = 0.5, the hypothesis of uniform distribution. |
| Usage: | twrandomsample({nin}) | |
| Input: | ||
| nin | 4 x 1 vector of user-defined frequencies for the numbers 1,2,3,4 | |
; loads teachware library
library("tware")
; predefines some counts for the numbers 1,2,3,4
nin=2|10|5|3
; calls random sample teachware example
twrandomsample(nin)
A graphic with bar charts representing the observed counts
and a text window with p-values and test statistic for
the hypothesis H0: p{2,3} = 0.5 is displayed