# Hypothesis testing with custom densities

**URL:** <https://discourse.julialang.org/t/hypothesis-testing-with-custom-densities/6808>\
**Category:** General Usage\
**Tags:** statistics\
**Created:** [October 31, 2017, 5:30pm UTC](https://discourse.julialang.org/t/hypothesis-testing-with-custom-densities/6808 "2017-10-31T17:30:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gideonsimpson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gideonsimpson/32/1928_2.png) [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Post date:** [October 31, 2017, 5:30pm UTC](https://discourse.julialang.org/t/hypothesis-testing-with-custom-densities/6808/1 "2017-10-31T17:30:20Z")

</div>

The HypothesisTests module includes a number of statistical tests for comparing against known distributions. Supposing that I have the density for a univariate variable defined as some function, `f(x)`, is there a way to turn this into a UnivariateDistribution that could be passed to, for instance, `HypothesisTests.ExactOneSampleKSTest` along with empirical data?
