# probnum.randvars¶

Random Variables.

Random variables generalize multi-dimensional arrays by encoding uncertainty about the (numerical) quantity in question. Despite their name, they do not necessarily represent stochastic objects. Random variables are also the primary in- and outputs of probabilistic numerical methods.

## Functions¶

 `asrandvar`(obj) Convert `obj` to a `RandomVariable`.

## Classes¶

 `RandomVariable`(shape, dtype[, parameters, ...]) Random variables represent uncertainty about a value. `DiscreteRandomVariable`(shape, dtype[, ...]) Random variable with countable range. `ContinuousRandomVariable`(shape, dtype[, ...]) Random variable with uncountably infinite range. `Constant`(support) Random variable representing a constant value. `Normal`(mean, cov[, cov_cholesky]) Random variable with a normal distribution. `Categorical`(probabilities[, support]) Categorical random variable. `WrappedSciPyRandomVariable`(scipy_rv) Wrapper for SciPy random variable objects. Wrapper for discrete SciPy random variable objects. Wrapper for continuous SciPy random variable objects. `_RandomVariableList`(rv_list) List of RandomVariables with convenient access to means, covariances, etc.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6919935,"math_prob":0.9576891,"size":877,"snap":"2023-40-2023-50","text_gpt3_token_len":171,"char_repetition_ratio":0.23024055,"word_repetition_ratio":0.13709678,"special_character_ratio":0.1949829,"punctuation_ratio":0.14285715,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.985192,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-10-03T20:25:41Z\",\"WARC-Record-ID\":\"<urn:uuid:36483318-9af1-4b36-8b84-c4611990470f>\",\"Content-Length\":\"84046\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:414184a5-d0f2-4cc6-b753-2a9c67b846b2>\",\"WARC-Concurrent-To\":\"<urn:uuid:f56867ef-6404-4d60-b8b6-65208c9c52a5>\",\"WARC-IP-Address\":\"104.17.33.82\",\"WARC-Target-URI\":\"https://probnum.readthedocs.io/en/latest/api/randvars.html\",\"WARC-Payload-Digest\":\"sha1:UGPINOONM6UROZ63S5D7KDT5STULMS6T\",\"WARC-Block-Digest\":\"sha1:YTOZBVIH5G6FIKHXBG3GVXXIELB5GQLT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233511220.71_warc_CC-MAIN-20231003192425-20231003222425-00637.warc.gz\"}"}