## Introduction

When statistical tests are conducted on tables containing *share* statistics (e.g., % Column Share), the tests are conducted using the averages, not the share statistics. This can lead to counter-intuitive results when reporting the shares. This page describes how to get Displayr to instead test differences between the shares.

## Example of the problem

In the table below on the left, for example, the automatic statistical testing shows that `Pepsi` is significantly higher amongst the heavy consumers than the light consumers, but the actual numbers on the table show the opposite conclusion. The table on the right shows the averages, from which we can see that the average is higher for `Pepsi` amongst `Heavy consumers`.

## Method

The solution to the problem is to transform the data, so that the **Average** on the table is proportional to the **% Column Share**:

- Compute a new variable set that contains the share computed for each case:
**Anything > Data > Variables > New > Ready-Made New Variable(s) > Case-Level Shares**. - Drag your variable onto your page to create a table of this variable.
- Select the original variables in the
**Data Sets**tree, right-click and select**Ready-Made New Variables > Sum**. - Tag the newly-created variable as a weight by ticking
**Usable as a weight**in the object inspector. - Select the table and apply the weight via
**Inputs > FILTERS & WEIGHT > Weight**.

The Average and % Column Share on the tables will now coincide, and the statistical tests now, as a consequence, can be interpreted as testing differences in % Column Share.