> For the complete documentation index, see [llms.txt](https://docs.pptxbuilder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pptxbuilder.com/api-reference/json-pptx/request-data/significance-test.md).

# Significance Test

this page describes how to perform significance testing on your data.

## How we calculate significance difference

We use a calculation called `z-test` . You can choose to perform significance testing between the Column or Row values. It's also possible to select which algorithm to use: All against all, all selected values against a control group, each value against the next value or each value against the previous value.

Bellow is the specification for the options you can use.

{% hint style="info" %}
If you want to perform significance testing on your data you'll need to purchase the `sigtesting` feature.
{% endhint %}

| Name         | Required |   Type  | Description                                                                                                      | Values                                                                                                                                                             |
| ------------ | :------: | :-----: | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| status       |   true   | Boolean | This parameter controls if significance testing is turned on/off                                                 | `true/false`                                                                                                                                                       |
| analysisType |   true   |  String | This parameter controls the significance testing algorithm performed on the data.                                | <ul><li><code>ALL\_VS\_ALL</code></li><li><code>CONTROL\_GROUP</code></li><li><code>NEXT\_DATA\_POINT</code></li><li><code>PREVIOUS\_DATA\_POINT</code> </li></ul> |
| baseLimit    |   true   | Integer | This parameter controls the minimum value for base to be considered for significance testing.                    | `0 - infinite`                                                                                                                                                     |
| confidence   |   true   |  String | This parameter controls the confidence level.                                                                    | <ul><li><code>90</code></li><li><code>95</code></li><li><code>99</code></li></ul>                                                                                  |
| testGroups   |   false  |  Array  | If you select `analysisType`  `CONTROL_GROUP` you need to select which groups to test against set control group. | `[ 'A group unique ID' , 'A second group unique ID' ]`                                                                                                             |
| controlGroup |   false  |  String | If you select `analysisType`  `CONTROL_GROUP` you need to select which group will the results be tested against. | `"A control group unique ID"`                                                                                                                                      |
| testBetween  |   true   |  String | This parameter controls if it should be tested between `Columns` or `Rows`                                       | <ul><li><code>TEST\_BETWEEN\_COLUMNS</code></li><li><code>TEST\_BETWEEN\_ROWS</code></li></ul>                                                                     |

{% hint style="warning" %}
If you want to perform significance testing against a `CONTROL_GROUP` you need to add unique IDs to all the columns, items and rows in order for us to identify which columns / rows you are referring to.

If request payload contains incorrect IDs in `controlGroup, testGroups` or it will not match with any column, item or row we will return an error message.
{% endhint %}

#### Example JSON

The SigOptions attribute has to be passed as part of the chart Object.

```javascript
{
	"body": [{
		"slide": {
			"id": "desired-unique-id",
			"table_text": "Colors",
			"question_text": "What is your favourite color?",
			"base_text": "Base Colors",
			"layout": {
				"slide_master_index": 0,
				"slide_layout_index": 1
			}
		},
		"charts": [
			{
				"sigOptions": {
					"analysisType": "CONTROL_GROUP",
					"baseLimit": 0,
					"confidence": "90",
					"controlGroup": "unique-item-id-1",
					"status": true,
					"testBetween": "TEST_BETWEEN_COLUMNS",
					"testGroups": [
						"unique-item-id-2"
					]
				}
			}
		],
		"custom_obj": {}
	}]
}
```
