meanTPS | R Documentation |
Computes the sample mean of a time-persistent function.
meanTPS(times = NULL, numbers = NULL)
times |
A numeric vector of non-decreasing time observations |
numbers |
A numeric vector containing the values of the time-persistent statistic between the time observation |
The lengths of times
and numbers
either must be the
same, or times
may have one more entry than numbers
(interval endpoints vs. interval counts). The sample mean is the area
under the step-function created by the values in numbers
between
the first and last element in times
divided by the length of the
observation period.
the sample mean of the time-persistent function provided
Barry Lawson (blawson@bates.edu),
Larry Leemis (leemis@math.wm.edu),
Vadim Kudlay (vkudlay@nvidia.com)
times <- c(1,2,3,4,5)
counts <- c(1,2,1,1,2)
meanTPS(times, counts)
output <- ssq(seed = 54321, maxTime = 100, saveServerStatus = TRUE)
utilization <- meanTPS(output$serverStatusT, output$serverStatusN)
# compute and graphically display mean of number in system vs time
output <- ssq(maxArrivals = 60, seed = 54321, saveAllStats = TRUE)
plot(output$numInSystemT, output$numInSystemN, type = "s", bty = "l",
las = 1, xlab = "time", ylab = "number in system")
timeAvgNumInSysMean <- meanTPS(output$numInSystemT, output$numInSystemN)
abline(h = timeAvgNumInSysMean, lty = "solid", col = "red", lwd = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.