StatWhy: Formal Verification Tool for Statistical Hypothesis Testing Programs (2405.17492v3)
Abstract: Statistical methods have been widely misused and misinterpreted in various scientific fields, raising significant concerns about the integrity of scientific research. To mitigate this problem, we propose a tool-assisted method for formally specifying and automatically verifying the correctness of statistical programs. In this method, programmers are required to annotate the source code of the statistical programs with the requirements for these methods. Through this annotation, they are reminded to check the requirements for statistical methods, including those that cannot be formally verified, such as the distribution of the unknown true population. Our software tool StatWhy automatically checks whether programmers have properly specified the requirements for the statistical methods, thereby identifying any missing requirements that need to be addressed. This tool is implemented using the Why3 platform to verify the correctness of OCaml programs that conduct statistical hypothesis testing. We demonstrate how StatWhy can be used to avoid common errors in various statistical hypothesis testing programs.
- Kanji, G.K.: 100 statistical tests. Sage (2006)
- Kawamoto, Y.: Towards logical specification of statistical machine learning. In: Proc. SEFM 2019. pp. 293–311 (2019). https://doi.org/10.1007/978-3-030-30446-1_16
- Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proc. LICS 2002. pp. 55–74. IEEE Computer Society (2002)
- Winskel, G.: The Formal Semantics of Programming Languages—An Introduction. The MIT Press (1993)