TimeDistribution

TimeDistribution[dist,tunit]

represents a linear distribution of time of day according to dist with time scale unit tunit originating at midnight.

TimeDistribution[dist, tunit, torig]

represents a linear distribution of time of day with time origin at torig.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Define a continuous time distribution:

Compute the mean of the distribution:

Simulate a time:

The distribution is left truncated at 0, which corresponds to midnight:

Define a discrete time distribution:

Compute the median of the distribution:

Simulate a time:

Simulate a list of times and visualize their distribution:

Scope  (6)

Define a continuous time distribution with mean at noon:

Compute the mean of the distribution:

Simulate a time:

Simulate a list of times and visualize their distribution:

Define a nonsymmetric distribution of times starting at 8am:

Simulate the instances:

Estimate TimeDistribution from the collection of times:

Since the data histogram is bell shaped, fit a normal distribution to the data:

Compute distribution functions:

Compute distribution moments:

The number of patients arriving at an emergency room has been recorded for each hour from 1am to midnight:

Create a nonparametric model of the data:

Use the model to create a distribution of times:

Simulate and visualize the sample:

Options  (1)

Time Zone  (1)

Specifying TimeZone will override the date origin input:

Properties & Relations  (3)

Extract properties of a TimeDistribution:

List of properties:

Granularity of a discrete time distribution is given by the date scale unit:

Granularity of a continuous time distribution is always "Instant":

Possible Issues  (2)

The input distribution must be a valid distribution:

Check if a distribution is valid:

Create a valid distribution:

The unit must be a valid time unit:

Check if a unit is a time unit:

For a time unit:

Or use KnownUnitQ with the second argument set to "Time":

Wolfram Research (2024), TimeDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeDistribution.html.

Text

Wolfram Research (2024), TimeDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeDistribution.html.

CMS

Wolfram Language. 2024. "TimeDistribution." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TimeDistribution.html.

APA

Wolfram Language. (2024). TimeDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TimeDistribution.html

BibTeX

@misc{reference.wolfram_2024_timedistribution, author="Wolfram Research", title="{TimeDistribution}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/TimeDistribution.html}", note=[Accessed: 16-September-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_timedistribution, organization={Wolfram Research}, title={TimeDistribution}, year={2024}, url={https://reference.wolfram.com/language/ref/TimeDistribution.html}, note=[Accessed: 16-September-2024 ]}