--- myst: substitutions: sentence1: "As from version 4.8 of the Uranie platform it" sentence2: "its class name in {{uranie}} and" sentence3: "a piece of code is provided to show how to draw a simple PDF, along with" sentence4: "that displays" footnote: "[^dataserver]" bloc: python: 3-6 cpp: 4-7 --- (dataserver_attribute_introducing_tstochastic_attribute)= # Introducing the {{ tstoatt }} classes The {{tstoatt}} is the parent class to all attributes which values can be generated by a {{tsam}} (as discussed in [](#sampler_stochastic_method)). All child objects are random variables, following a specific law, that depends on a small number of parameters. ```{include} /../core/dataserver/attribute/introducing_tstochastic_attribute.md ``` [^dataserver]: for a definition of PDF (*probability density function*), CDF (*cumulative density function*) and inverse CDF, please look at {{metho}} For all these laws, the parameters can be set at the constructor (as shown in the previous example block) but, if this has not been done it is possible to change their value using the `setParameters` method. To define a random variable, the corresponding constructor must be used. The arguments of these constructors are first, the name of the variable and second, the parameters of the law. For example: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/attribute/" + language + "/introduce_stocha_classes." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc[language] + "\n" + "```" }} 1. Allocation of a pointer *pxu* to a random uniform variable *x1* in interval [-1.0, 1.0]. 2. Allocation of a pointer *pxn* to a random normal variable *x2* with mean value $\mu=-1.0$ and standard deviation $\sigma=1.0$. These distributions can be used to model the behaviour of inputs, the choice being generally based on the way the PDF looks like. For every distributions implemented in {{uranie}} examples of PDF, CDF and inverse CDF are show from [](#dataserver_uniform) until [](#dataserver_inv_gamma). Here is a brief description of the probability density functions and their parameters. ```{toctree} introducing_tstochastic_attribute/uniform_law introducing_tstochastic_attribute/log_uniform_law introducing_tstochastic_attribute/triangular_law introducing_tstochastic_attribute/log_triangular_law introducing_tstochastic_attribute/normal_law introducing_tstochastic_attribute/log_normal_law introducing_tstochastic_attribute/trapezium_law introducing_tstochastic_attribute/uniform_by_parts_law introducing_tstochastic_attribute/exp_law introducing_tstochastic_attribute/cauchy_law introducing_tstochastic_attribute/gumbel_law introducing_tstochastic_attribute/weibull_law introducing_tstochastic_attribute/beta_law introducing_tstochastic_attribute/gen_pareto_law introducing_tstochastic_attribute/gamma_law introducing_tstochastic_attribute/inv_gamma_law introducing_tstochastic_attribute/student_law introducing_tstochastic_attribute/gene_normal_law introducing_tstochastic_attribute/compose_law ```