# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# matlab.perftest.FrequentistTimeExperiment class

Package: matlab.perftest
Superclasses: `matlab.perftest.TimeExperiment`

`TimeExperiment` that collects variable number of measurements

## Description

A `FrequentistTimeExperiment` is an instance of the `TimeExperiment` class that collects a variable number of measurements. The test framework collects a variable number of measurements to reach a specified relative margin of error at a specified confidence level.

To create a `FrequentistTimeExperiment` instance, use the `matlab.perftest.TimeExperiment.limitingSamplingError` static method.

## Properties

expand all

Number of warm-up measurements, specified as a nonnegative integer. `NumWarmups` defines the number of times that the test framework runs the test code to warm it up.

Minimum number of sample measurements, specified as an integer greater than 1. `MinSamples` defines the minimum number of times that the test framework runs the test code after `NumWarmups`. The test framework exercises the test code at least `MinSamples` times, regardless of whether the experiment meets the statistical objectives.

Maximum number of sample measurements, specified as an integer greater than or equal to `MinSamples`. `MaxSamples` defines the maximum number of times that the test framework runs the test code after `NumWarmups`. The test framework will stop after is takes `MaxSamples` samples, even if the experiment does not meet the statistical objectives.

Goal relative margin of error for samples, specified as a positive number.

The framework calculates the Relative Margin of Error for a sample `X` using the equation

`$\text{relMoE}=\frac{\text{T}\ast \text{std(X)}}{\text{mean(X)}\ast \sqrt{\text{length(X)}}}$`
where `T` is the T-score from Student's T distribution using the specified `ConfidenceLevel` and `length(X)-1` degrees of freedom.

Confidence level for the samples to be within the relative margin of error, specified as a number between 0 and 1.

## Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.