jrossthomson / bigquery-utils

Useful scripts, udfs, views, and other utilities for migration and data warehouse operations in BigQuery.
https://cloud.google.com/bigquery/
Apache License 2.0
0 stars 0 forks source link

feat: implement t-test paired stored proc #27

Closed imathews closed 2 years ago

imathews commented 2 years ago

@boaguilar I removed the N > 0 check for the t_test_paired, as this was consistent with how we'd previously implemented the t_test (students) UDF. I don't have any opinion one way or another — if the check is present, the query will just return zero results; otherwise, it'll return a struct with the values shown below (including NaN).

I'm not really sure what's more "correct", though maybe easier for the user to handle the NaN case since the result always has the same shape?

Screen Shot 2022-02-15 at 15 32 27
jrossthomson commented 2 years ago

@boaguilar can you give an approval on this before I merge?

boaguilar commented 2 years ago

@boaguilar can you give an approval on this before I merge?

Hi Ian and Ross, I think this make sense so please merge the changes. Boris