# How to Scale Respondents to have a Mean of 0 and a Standard Deviation of 1

From Q

- In the Variables and Questions tab select the variables that you wish to use and select
**Insert Ready-Made Formula(s) > Mathematical Functions (by Case) > Standard Deviation**. - Change the name of the newly constructed variable to
`stDev`. - Selecting the variables that you wish to use and select
**Insert Ready-Made Formula(s) > Mathematical Functions (by Case) > Average**. - Change the name of the newly constructed variable to
`ave`. - Create a new Numeric JavaScript Variable, filling it out as follows:
**Label**The unique aspect of the**Label**of the first of the clustering variables. For example, if the first of the clustering variables is`Attitude Coke`, the new variable should have a label like`Scaled Coke`.-
**Expression**:`if(stDev == 0) NaN; else (var1 – ave)/stDev;`, where`var1`is the`Name`of the first clustering variable. - Then press
**OK**.

- Select the newly constructed variable and select
**Insert Ready-Made Formula(s) > Use as Template for Replication'***and**OK*.