Question

Is there a normdist calculation in looker?

  • 30 April 2015
  • 2 replies
  • 846 views

I am trying to add a statistical significance calculation to my table using table calculations in looker. I have got to a z-score using the standard functions available but cannot find a way to turn this into a p-value. Is there something like the normdist function found in excel and R that I can use in looker, or is this something that may be coming in the future?


2 replies

Userlevel 4

Hi Rebecca,


This doesn’t exist at the moment, we have been using lookup tables the handful of times we have done it internally. Here is the example:


  - measure: significance
sql: |
CASE
WHEN (ABS(${t_score}) > 3.291) THEN '(7) .0005 sig. level'
WHEN (ABS(${t_score}) > 3.091) THEN '(6) .001 sig. level'
WHEN (ABS(${t_score}) > 2.576) THEN '(5) .005 sig. level'
WHEN (ABS(${t_score}) > 2.326) THEN '(4) .01 sig. level'
WHEN (ABS(${t_score}) > 1.960) THEN '(3) .025 sig. level'
WHEN (ABS(${t_score}) > 1.645) THEN '(2) .05 sig. level'
WHEN (ABS(${t_score}) > 1.282) THEN '(1) .1 sig. level'
ELSE '(0) Insignificant'
END

Thank you will try that.

Reply