Loading...

vastorbit.VastColumn.sem

VastColumn.sem() Annotated[bool | float | str | timedelta | datetime, 'Python Scalar']

Leverages the sem (Standard Error of the Mean) aggregation technique to perform analysis and aggregation on the VastColumn. Standard Error of the Mean is a valuable statistical measure used to estimate the precision of the sample mean as an approximation of the population mean.

When we aggregate the VastColumn using sem, we gain insights into the variability or uncertainty associated with the sample mean. This measure helps us assess the reliability of the sample mean as an estimate of the true population mean.

It is worth noting that computing the Standard Error of the Mean requires statistical calculations and can be particularly useful when evaluating the precision of sample statistics or making inferences about a larger dataset based on a sample.

Warning

To compute sem, vastorbit needs to execute multiple queries. It necessitates, at a minimum, a query that includes a subquery to perform this type of aggregation. This complexity is the reason why calculating sem is typically slower than some other types of aggregations.

Returns:

sem

Return type:

PythonScalar

Examples

For this example, let’s generate a dataset and calculate the standard error of the mean of a column:

import vastorbit as vo

data = vo.VastFrame(
    {
        "x": [1, 2, 4, 9, 10, 15, 20, 22],
        "y": [1, 2, 1, 2, 1, 1, 2, 1],
        "z": [10, 12, 2, 1, 9, 8, 1, 3],
    }
)
data["x"].sem()

Note

All the calculations are pushed to the database.

Hint

For more precise control, please refer to the aggregate method.

See also

VastColumn.mad() : Mean Absolute Deviation for a specific column.
VastFrame.sem() : Standard Error of Mean for particular columns.