# Kurtosis - script function

Kurtosis() returns the kurtosis of the data in the expression over a number of records as defined by a group by clause.

Syntax:

Kurtosis([distinct ] expr )

Return data type: numeric

Arguments:

Kurtosis arguments

| Argument | Description |
| --- | --- |
| expr | The expression or field containing the data to be measured. |
| distinct | If the word distinct<br>occurs before the expression, all duplicates will be disregarded. |

Examples and results:

Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.

Examples and results

| Example | Result |
| --- | --- |
| `Table1:`<br>`crosstable LOAD recno() as ID, * inline [`<br>`Observation\|Comparison`<br>`35\|2`<br>`40\|27`<br>`12\|38`<br>`15\|31`<br>`21\|1`<br>`14\|19`<br>`46\|1`<br>`10\|34`<br>`28\|3`<br>`48\|1`<br>`16\|2`<br>`30\|3`<br>`32\|2`<br>`48\|1`<br>`31\|2`<br>`22\|1`<br>`12\|3`<br>`39\|29`<br>`19\|37`<br>`25\|2 ] (delimiter is '\|');` `Kurtosis1:``LOAD Type,``  Kurtosis(Value) as MyKurtosis1, `` Kurtosis(DISTINCT Value) as MyKurtosis2  ``Resident Table1 Group By Type;<br>`` ` | In a table with the dimensions `Type`, `MyKurtosis1`,and `MyKurtosis2`, the results of the Kurtosis() calculations in the load script are:<br><br>`Type MyKurtosis1 MyKurtosis2`<br>`Comparison -1.1612957 -1.4982366`<br>`Observation -1.1148768 -0.93540144` |