Computes all possible samples from a given population using simple random sampling.

SRS(POPvalues, n)

Arguments

POPvalues

vector containing the poulation values.

n

the sample size.

Value

Returns a matrix containing the possible simple random samples of size n taken from a population POPvalues.

See also

Author

Alan T. Arnholt

Examples


SRS(c(5,8,3),2)
#>      [,1] [,2]
#> [1,]    5    8
#> [2,]    5    3
#> [3,]    8    3
    # The rows in the matrix list the values for the 3 possible
    # simple random samples of size 2 from the population of 5,8, and 3.