February 22, 2024

Use the Standard Normal Distribution (Z) Table with Power Query

If drawn to scale, that wrestler is frighteningly large

The Standard Normal Distribution Table is often referenced in statistics textbooks (in the one I have it was Appendix A). It is a table that provides the area to the left of the mean given a z-score.

You can use this table to figure out the probability that conditions are true. The Wikipedia article for this provides some good examples as to how you can use this to calculate probabilities.

Of course, I wanted to use this in Power Query, so I made a function.

The Code

Here is the gist. It is quite long, so I will just post the link to the gist.

The majority of the code was just hardcoding values into a table. The remainder is pretty simple: based on inputs it will give you a left-tailed, right-tailed, or two-tailedz-score based on the confidence-level defined. If you are just trying to look up values for a z-score itself, you can pass in “z” with the score itself and see associated values.

Examples

Calling this

returns

While calling this

returns

And calling “t” returns

Lastly calling “z” and a z-score returns

Is This Useful?

Yes, I think so. Less looking up stuff, less reliance on other languages. For simple statistical investigations, this seems pretty useful. I already have a few functions in mind that will use this.

You may also like