AB Trend Tool Icon

AB Trend Tool

Version:
Current
Last modified: December 27, 2019

The AB Trend tool creates measures of trend and seasonal patterns (one value per test unit, such as a store or a customer) that can be used in helping to match treatment to control units for A/B testing. The trend measure is also likely to be of interest in its own right. The trend measure is based on period to period percentage changes in the rolling average (taken over a one year period to control for seasonal effects) in a performance measure of interest. The same performance measure is used to assess seasonal effects. In particular, the percentage of the total level of the performance measure of interest in each reporting period is used as the measure to assess seasonal patterns. For example, if the performance measure is sales and the reporting period is weeks, then the percentage of total sales (over a 52 week period) that fall into each of 52 weeks is used. The measures of the per period percentage of annual sales are dimensionally reduced via principal components analysis.

Since the measures involve using over a year's worth of historic data, it is important to have sufficient historic data available that is prior to the start of the test. If this condition is not met, then an error will occur.

This tool uses the R tool. Go to Options > Download Predictive Tools and sign in to the Alteryx Downloads and Licenses portal to install R and the packages used by the R Tool. See Download and Use Predictive Tools.

Connect an input

A Designer data stream that contains:

  • A unit identifier (e.g., a customer or store identification code)
  • A Date or DateTime field with date information for the reporting periods
  • A performance measure (such as sales or visitor traffic) that will be the basis of the trend and seasonality measures

Tool configuration

Input Data: Use the drop downs to specify:

  • Select the unit identifier: The field with the test unit identifier. For best results, this field should be some sort of character based type such as String or V-String.
  • Select the field with the reporting period dates: The field with the (Date or DateTime type) reporting period identifier.
  • Select the performance measure to use: The numeric field with the performance (e.g., sales, traffic) measure of interest.

Date Values: Use the drop downs to specify:

  • Report Period Type: The frequency with which the performance data is reported. One of Daily, Weekly, Monthly, or Quarterly.
  • Number of periods to calculate the trend.: the trend measure for the period to period percentage change in the rolling average is calculated as the average of multiple periods. The number of periods to use should depend on the frequency of reporting (the shorter the frequency, the more periods to use) and the underlying volatility of the performance measure (the more volatile, the more periods to use). In the case of performance measures that are reported on a weekly basis, our rule of thumb is to use 12 weeks, for a monthly reporting period, we suggest three months, and for data that is reported daily, we suggest 60 days.
  • Test Start Date: The date the test started, selected using a calendar interface.

View the output

The output is a data stream containing the following columns:

  • Identifier: The unit identifier code
  • Trend: The calculated trend value
  • Seasonality: The calculated relative seasonal pattern value
Was This Helpful?

Need something else? Visit the Alteryx Community or contact support.