
This function computes usedata
is set to FALSE
.
ppeak(k, n, lower.tail = FALSE, usedata = TRUE)
A double between 0 and 1 representing the probability of at least
(at most) k peaks occurring in a sequence of
names
attribute with the values corresponding to the
probabilities.
An integer or a sequence of integers strictly incrementing by 1,
with all values between 0 and n - 1
inclusive. Represents the
number of peaks in the sequence.
A positive integer representing the number of observations in the sequence.
A logical. Should lower tailed cumulative probability be
calculated? Defaults to FALSE
due to function being designed
primarily for calculating k
.
A logical. Should probability mass function values be
read from dpeakdat
rather than computing them from
dpeak
? This option will save significantly on
computation time if
dpeak
, goldfeld_quandt
# For an independent sample of size 250, the probability of at least 10
# peaks is 0.02650008
ppeak(k = 10, n = 250, lower.tail = FALSE, usedata = TRUE)
# For an independent sample of size 10, the probability of at most 2 peaks
# is 0.7060615
ppeak(k = 2, n = 10, lower.tail = TRUE, usedata = FALSE)
Run the code above in your browser using DataLab