Built-in Functions
In addition to standard algebraic and logical operators, Insight Maker has many built-in functions. The following is a list of these functions along with descriptions and sample usages.
- Mathematical Functions (29)
- Time Functions (13)
- Historical Functions (14)
- Random Number Functions (13)
- Agent Functions (25)
- Vector Functions (23)
- General Functions (6)
- String Functions (10)
- Programming (10)
- User Input Functions (3)
- Statistical Distributions (20)
Mathematical Functions
Rounds a number to the nearest integer.
Basic Structure:
Description:
The Round function rounds a given numerical value to the nearest integer.
Use cases include rounding values where only a whole number is needed. For example, if a stock contains a population size, you might round the value to the nearest whole number in the output, as you cannot have a fraction of a person. Similarly, in financial calculations, you might round the result to the nearest dollar or cent.
Examples:
Rounds a number up to the nearest integer.
Basic Structure:
Description:
The Ceiling function rounds a number up to the nearest integer, regardless of the fractional part.
For example, in construction, when calculating the number of tiles needed to cover a floor, one would round up to ensure there are enough tiles, even if only a fraction of the last tile is needed.
Examples:
Rounds a number down to the nearest integer.
Basic Structure:
Description:
The Floor function rounds a number down to the nearest integer. This function may be used when allocating resources that cannot be fractioned. For example, it could be used in manufacturing for determining the maximum number of products that can be created from a given set of raw materials.
Examples:
Finds the cosine of an angle.
Basic Structure:
Description:
The Cos function calculates the cosine of a given angle, which must be specified in radians. The cosine of an angle in a right triangle is the ratio of the length of the adjacent side to the length of the hypotenuse. This function is widely used in trigonometry, physics, and engineering to determine the orientation or alignment of objects in space.
Examples:
Finds the arc-cosine of a value. The result includes units.
Basic Structure:
Description:
The ArcCos function, or inverse cosine, calculates the angle (in radians) whose cosine is the given value. This function is useful for deriving an angle from the cosine ratio, playing a key role in trigonometry, geometry, and physics. It's often used in calculating angles for design and analysis in engineering, determining the orientation of objects, and converting between coordinate systems.
Examples:
Finds the sine of an angle.
Basic Structure:
Description:
The Sin function calculates the sine of a specified angle, provided in radians. The sine of an angle in a right triangle is the ratio of the length of the opposite side to the hypotenuse. This function is used in various fields like trigonometry, physics, and engineering for understanding wave patterns, oscillations, and circular motion.
Examples:
Finds the arc-sine of a value. The result includes units.
Basic Structure:
Description:
The ArcSin function, or inverse sine, finds the angle (in radians) whose sine is the given value. It's pivotal in trigonometry for solving triangles, in physics for calculating angles of incidence and reflection, and in engineering for design and analysis that involves angular measurements.
Examples:
Finds the tangent of an angle.
Basic Structure:
Description:
The Tan function computes the tangent of a given angle, expressed in radians. The tangent of an angle in a right triangle is the ratio of the length of the opposite side to the adjacent side. This function is used for applications involving slopes, angles, and curves in fields such as trigonometry, calculus, and physics.
Examples:
Finds the arc-tangent of a value. The result includes units.
Basic Structure:
Description:
The ArcTan function, or inverse tangent, calculates the angle (in radians) whose tangent is the given value. It's particularly useful in trigonometry for determining the angle of a line, in physics for calculating angles of trajectories, and in engineering for angle measurements in design and construction.
Examples:
Returns the base-10 logarithm of a number.
Basic Structure:
Description:
The Log function returns the base-10 logarithm of a number, a fundamental operation in mathematics that determines how many times one number should be multiplied by itself to reach another number. It can be used to model exponential growth or decay, sound intensity, and in financial calculations involving interest rates.
Examples:
Returns the natural logarithm of a number.
Basic Structure:
Description:
The Ln function computes the natural logarithm (logarithm to the base e) of a given number. It is the inverse of the Exp function.
Understanding the natural logarithm is used for solving equations involving exponential growth or decay, and it plays a significant role in differential equations and calculus.
Examples:
Returns e taken to a power.
Basic Structure:
Description:
The Exp function calculates the value of e (approximately 2.71828), the base of natural logarithms, raised to a given power. It is the inverse of the Ln function.
It is used for understanding continuous growth processes, like population growth, radioactive decay, and continuously compounded interest.
Examples:
Returns the factorial of a number.
Basic Structure:
Description:
The Factorial function returns the product of all positive integers up to Number. It is commonly used in combinatorics, probability calculations, and formulas that count arrangements or permutations.
Examples:
Returns the sum of a vector or list of numbers.
Basic Structure:
Description:
The Sum function calculates the total sum of a series of numbers provided as arguments. You may also use this function to sum the elements of a vector.
Examples:
Returns the product of a vector or list of numbers.
Basic Structure:
Description:
The Product function multiplies together all the numbers provided as arguments. You may also use this function to find the product of the elements in a vector.
This function is particularly useful in scenarios where the total product of a series of factors is needed, such as compound interest calculations, production output estimations, and in determining the likelihood of independent events occurring in sequence.
Examples:
Returns the largest of a vector or list of numbers.
Basic Structure:
Description:
The Max function identifies and returns the largest number from a given list or vector of numerical values. It is used to find the highest value in a dataset, such as the maximum temperature recorded in a day, the highest stock price in a given period, or the maximum capacity of a system.
Examples:
Returns the smallest of a vector or list of numbers.
Basic Structure:
Description:
The Min function finds and returns the smallest number from a list or vector of numerical values. It can be used to find the minimum required resources, the lowest temperature, or the least cost in optimizations.
Examples:
Returns the mean (average) of a vector or list of numbers.
Basic Structure:
Description:
The Mean function calculates the arithmetic average of a set of numbers by summing all the numbers and then dividing by the count of numbers. You may also use this function to find the mean of the elements in a vector.
This function can help analyze average income in demographics studies, average temperature for climate analysis, or overall performance in academic assessments.
Examples:
Returns the median of a vector or list of numbers.
Basic Structure:
Description:
The Median function calculates the middle value of a sorted list of numbers, dividing the data set into two halves. If the list has an even number of observations, the median is the average of the two middle numbers. You may also use this function to find the median of the elements in a vector. It's a critical measure in statistics to identify the central tendency without being skewed by outliers.
Examples:
Returns the standard deviation of a vector or list of numbers.
Basic Structure:
Description:
The StdDev function calculates the standard deviation, a measure of the amount of variation or dispersion in a set of numbers. A low standard deviation indicates that the values tend to be close to the mean, whereas a high standard deviation indicates that the values are spread out over a wider range.
To calculate the standard deviation of a list of numbers, first calculate the mean (average) of the numbers, then subtract the mean from each number to find the deviations, square each deviation, calculate the mean of these squared deviations, and finally take the square root of this mean.
It's widely used to measure volatility, in quality control to assess variability of manufacturing outputs, and in research to quantify the variance in experimental data.
Examples:
Returns the correlation between two vectors of numbers.
Basic Structure:
Description:
The Correlation function calculates the Pearson correlation coefficient between two vectors. The vectors must contain the same number of elements and have at least two elements. A result near 1 indicates a strong positive linear relationship, a result near -1 indicates a strong negative linear relationship, and a result near 0 indicates little linear relationship.
Examples:
Returns the absolute value of a number.
Basic Structure:
Description:
The Abs function calculates the absolute value of a number, which is the number's distance from zero on the number line without considering direction.
Applications include calculating the absolute difference between two numbers, adjusting negative values to positive for analyses that do not consider direction, and to represent absolute changes in values.
Examples:
Returns the remainder of the division of two numbers.
Basic Structure:
Description:
The Mod operator calculates the remainder of the division of two numbers. It is used in programming, mathematics, and cryptography for operations such as determining even or odd numbers, distributing items evenly across groups, and cyclic processes. The % operator is a synonym for mod.
This function is useful for algorithms that require periodicity, loop iterations with a fixed step size, and in scenarios where the exact division ratio is crucial.
Examples:
Returns the square root of a number.
Basic Structure:
Description:
The Sqrt function calculates the square root of a given number, which is the value that, when multiplied by itself, gives the original number.
Common use cases include determining the length of the side of a square given its area, scaling data, and in quadratic equations to find the distance between two points.
Examples:
1 if the value is greater than 0, -1 if it is less than 0, and 0 if it is 0.
Basic Structure:
Description:
The Sign function determines the sign of a number, returning 1 for positive numbers, -1 for negative numbers, and 0 for zero.
This function aids in categorizing numerical data based on its sign, simplifying the handling of conditional operations that vary with the positive or negative nature of inputs.
Examples:
The value 3.14159265.
Basic Structure:
Description:
The constant pi represents the ratio of the circumference of a circle to its diameter, approximately equal to 3.14159265. It's a fundamental element in geometry, trigonometry, and calculus, involved in calculations of areas, volumes, and trigonometric functions.
Examples:
The value 2.71828183.
Basic Structure:
Description:
The constant e is the base of the natural logarithm, approximately equal to 2.71828183. It plays an important role in calculus, particularly in the context of exponential growth and decay, compounding interest calculations, and in the solution of differential equations.
Examples:
Returns the logit transformation of the value. Converts values on a 0 to 1 scale to a -Infinity to Infinity scale.
Basic Structure:
Description:
The Logit function applies the logit transformation to a value, converting probabilities (values between 0 and 1) into log-odds (values from -Infinity to Infinity). It's a key function in logistic regression and other statistical models dealing with probabilities and odds. It is the inverse of the Expit function.
Examples:
Returns the expit transformation of the value. Converts values on a -Infinity to Infinity scale to a 0 to 1 scale.
Basic Structure:
Description:
The Expit function, also known as the logistic function, converts log-odds (values ranging from -Infinity to Infinity) back into probabilities (values between 0 and 1). It's widely used in logistic regression, artificial neural networks, and in contexts requiring the interpretation of odds as probabilities. It is the inverse of the Logit function.
Examples:
Time Functions
The current time in seconds.
Basic Structure:
Description:
The Seconds function returns the current simulation time in seconds. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The current time in minutes.
Basic Structure:
Description:
The Minutes function returns the current simulation time in minutes. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The current time in hours.
Basic Structure:
Description:
The Hours function returns the current simulation time in hours. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The current time in days.
Basic Structure:
Description:
The Days function returns the current simulation time in days. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The current time in weeks.
Basic Structure:
Description:
The Weeks function returns the current simulation time in weeks. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The current time in months.
Basic Structure:
Description:
The Months function returns the current simulation time in months. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The current time in years.
Basic Structure:
Description:
The Years function returns the current simulation time in years. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The current time including units.
Basic Structure:
Description:
The Time function returns the current simulation time with its associated units. It is useful for tracking and controlling simulation events over time, such as scheduling tasks, monitoring progress, and modeling time-dependent processes.
Examples:
The simulation start time including units.
Basic Structure:
Description:
The TimeStart function provides the start time of the simulation including its units. This can be used to calculate elapsed time.
Examples:
The simulation time step including units.
Basic Structure:
Description:
The TimeStep function indicates the time step of the simulation including units, allowing for adjustments based on the simulation's granularity and ensuring smooth progression of time-dependent processes.
Examples:
The total length of the simulation including units.
Basic Structure:
Description:
The TimeLength function returns the total duration of the simulation from start to end, including units. You can use it to track how long is left in the simulation.
Examples:
The time at which the simulation ends including units.
Basic Structure:
Description:
The TimeEnd function returns the end time of the simulation including units. You can use it to track how long is left in the simulation.
Examples:
Model of seasonality influences. Sine wave with a period of one year, a peak amplitude of one, and a peak at the specified time.
Basic Structure:
Description:
The Seasonal function models seasonality effects using a sine wave with a period of one year. The Peak parameter specifies the time of year at which the peak occurs. This function is particularly useful for simulating seasonal variations in processes such as sales, temperature, or agricultural production.
Examples:
Historical Functions
Returns the value of a primitive for a specified length of time ago. Default Value stands in for the primitive value in the case of negative times.
Basic Structure:
Description:
The Delay function retrieves the value of a primitive from a specified length of time in the past. This is useful for modeling delays in systems, such as the lag between decision-making and observing the effects of those decisions. The Default Value is used for simulation times before the Delay Length has elapsed, ensuring the model behaves reasonably when data from the past is not yet available.
Examples:
Returns a smoothed, first-order exponential delay of a value. The Initial Value is optional.
Basic Structure:
Description:
The Delay1 function applies a first-order exponential smoothing to a value over a specified delay length. It models processes where changes occur gradually over time, such as the accumulation of experience or the slow adjustment of market prices to new information. The optional Initial Value parameter provides a starting value for the delay.
Examples:
Returns a smoothed, third-order exponential delay of a value. The Initial Value is optional.
Basic Structure:
Description:
The Delay3 function implements a third-order exponential smoothing, offering a more gradual response than Delay1. It is particularly effective for modeling systems with significant inertia or delay, such as the gradual adaptation of an ecosystem to climate change or the slow response of economic indicators to policy shifts. The optional Initial Value parameter provides a starting value for the delay.
Examples:
Returns a smoothed, exponential delay of a value with the specified order. The Initial Value is optional.
Basic Structure:
Description:
The DelayN function applies an nth order exponential smoothing to delay a value over a specified length of time. The order determines the degree of smoothing, with higher orders resulting in a smoother delay. This function is useful for modeling delays in systems where the effect of a change is spread out over time rather than occurring instantly. Common use cases include modeling the delayed impact of policy changes, environmental regulations, or marketing campaigns. The optional Initial Value provides a starting value for the delay.
Examples:
Returns a smoothing of a value. Results in an averaged curve fit. Length affects the weight of past values. The Initial Value is optional.
Basic Structure:
Description:
The Smooth function smooths a value over a specified length of time with first order exponential smoothing, effectively smoothing out fluctuations to reveal underlying trends. This is particularly useful in data analysis and modeling to reduce noise and make patterns more apparent. Applications range from smoothing economic indicators to analyzing trends in environmental data. The Length parameter determines how far back in time the smoothing considers, with longer lengths resulting in more significant smoothing. The optional Initial Value parameter provides a starting value.
Examples:
Returns a smoothing of a value with a specified order. Length affects the weight of past values. The Initial Value is optional.
Basic Structure:
Description:
The SmoothN function extends the Smooth function by applying nth order exponential smoothing, allowing for more sophisticated smoothing of data over time. This method is particularly useful for dealing with volatile data series, where a higher order of smoothing can help identify long-term trends and patterns. The Length parameter controls the temporal scope of the smoothing, and the Order parameter adjusts the degree of smoothing applied. The optional Initial Value parameter provides a starting value.
Examples:
Returns the values a primitive has taken on over the course of the simulation as a vector. The second optional argument is a time window to limit the depth of the history.
Basic Structure:
Description:
The PastValues function captures and returns a vector of all the values a specified primitive has assumed throughout the simulation or within a defined time window. This feature is particularly valuable for analyzing historical data within a model, such as tracking changes in a variable over time. It enables modelers to perform retrospective analyses, compare past and present values, and identify trends or patterns. The optional Period argument allows focusing on a specific timeframe.
Examples:
Returns the maximum of the values a primitive has taken on over the course of the simulation. The second optional argument is a time window to limit the calculation.
Basic Structure:
Description:
The PastMax function calculates the highest value that a specified primitive has reached during the simulation or within a given timeframe. It can be used to monitor maximum loads, peak performances, or the highest levels of resource utilization. The optional Period parameter allows for the analysis of peak values within a specific interval.
Examples:
Returns the minimum of the values a primitive has taken on over the course of the simulation. The second optional argument is a time window to limit the calculation.
Basic Structure:
Description:
The PastMin function computes the smallest value that a specified primitive (such as a variable or constant) has assumed during the simulation or within a specified time window specified by Period.
Examples:
Returns the median of the values a primitive has taken on over the course of the simulation. The second optional argument is a time window to limit the calculation.
Basic Structure:
Description:
The PastMedian function calculates the median value that a specified primitive has reached during the simulation or within a given time window specified by Period.
It provides a robust measure of central tendency, especially in skewed distributions.
Examples:
Returns the mean of the values a primitive has taken on over the course of the simulation. The second optional argument is a time window to limit the calculation.
Basic Structure:
Description:
The PastMean function computes the average value that a specified primitive has assumed during the simulation or within a specified Period.
Use cases include calculating the average growth rate of a population, the mean temperature for climatological studies, or the average revenue generated in a fiscal period.
Examples:
Returns the standard deviation of the values a primitive has taken on over the course of the simulation. The second optional argument is a time window to limit the calculation.
Basic Structure:
Description:
The PastStdDev function calculates the standard deviation of the values a specified primitive has taken on during the simulation or within a defined Period. This measure shows how much variation exists from the average or mean value.
A higher standard deviation indicates greater variability, whereas a lower standard deviation indicates that the values are closer to the mean.
Examples:
Returns the correlation between the values that two primitives have taken on over the course of the simulation. The third optional argument is an optional time window to limit the calculation.
Basic Structure:
Description:
The PastCorrelation function calculates the statistical correlation between the values of two specified primitives over the course of the simulation or within a given Period. This is used for identifying relationships between variables, such as the correlation between advertising spend and sales revenue, or temperature changes and ice cream sales.
A positive correlation indicates that as one primitive increases, the other tends to increase, while a negative correlation indicates that as one increases, the other tends to decrease.
Examples:
Takes the dynamic value and forces it to be fixed over the course of the period. If period is omitted, the value is held constant over the course of the whole simulation.
Basic Structure:
Description:
The Fix function locks the value of a dynamic variable, making it constant for a specified period or throughout the entire simulation if the Period is omitted. This is especially useful for things like sensitivity testing where you want to choose a random value at the start of the simulation and then hold it constant for the duration of the simulation.
Examples:
Random Number Functions
Generates a uniformly distributed random number between the minimum and maximum. The minimum and maximum are optional and default to 0 and 1 respectively.
Basic Structure:
Description:
The Rand function generates a random number that follows a uniform distribution between specified minimum and maximum values. If no parameters are provided, it defaults to a range between 0 and 1.
The uniform distribution is characterized by its equal probability for all values within the range.
Examples:
Generates a normally distributed random number with a mean and a standard deviation. The mean and standard deviation are optional and default to 0 and 1 respectively.
Basic Structure:
Description:
The RandNormal function generates a random number that follows a normal (Gaussian) distribution, defined by a specific Mean and Standard Deviation. By default, it produces a standard normal distribution with a mean of 0 and a standard deviation of 1.
Examples:
Generates a log-normally distributed random number with a mean and a standard deviation.
Basic Structure:
Description:
The RandLognormal function generates a random number with a distribution that is log-normally distributed, defined by its Mean and Standard Deviation in the log-space. This distribution is used to model variables whose log-transform is normally distributed, such as certain financial assets, life spans of technical products, and other skewed distributions.
Lognormal distribution values are always greater than 0, with a long tail to the right, making them suitable for representing quantities that cannot be negative.
Examples:
Returns true with the specified probability, otherwise false. The probability is optional and defaults to 0.5: a coin flip.
Basic Structure:
Description:
The RandBoolean function generates a binary outcome (true or false) based on a specified Probability. By default, with a probability of 0.5, it simulates a fair coin flip. This function is useful for modeling binary outcomes in simulations, such as success/failure, yes/no, or on/off scenarios, where each event has a certain probability of occurring.
Examples:
Generates a binomially distributed random number. The number of successes in Count random events each with Probability of success.
Basic Structure:
Description:
The RandBinomial function generates a random number representing the number of successes in a given Count number of trials, each with the same Probability of success. This function is used to model scenarios where an event has a binary outcome (success or failure) repeated multiple times, such as flipping a coin or quality control tests.
Examples:
Generates a negative binomially distributed random number. The number of random events each with Probability of success required to generate the specified Successes.
Basic Structure:
Description:
The RandNegativeBinomial function generates a random number representing the number of trials needed to achieve a specified number of Successes, where each trial has the same Probability of success. This function is useful in scenarios where the focus is on reaching a predetermined number of successes, such as the number of sales calls needed to achieve a set number of sales or the number of patients to treat before a certain number of recoveries is observed.
The negative binomial distribution is an extension of the binomial distribution, handling cases where the number of trials is not fixed in advance.
Examples:
Generates a Poisson distributed random number.
Basic Structure:
Description:
The RandPoisson function generates a random number following the Poisson distribution with a mean (Lambda) rate of occurrence. The Poisson distribution is used to model the number of times an event occurs within a fixed interval of time or space. This function is particularly useful in scenarios where events happen independently at a constant rate, such as the number of customers arriving at a store in an hour or the number of emails received per day.
Examples:
Generates a triangularly distributed random number.
Basic Structure:
Description:
The RandTriangular function generates a random number following a triangular distribution defined by a minimum, maximum, and peak (most likely value). This distribution is used for simulations where precise data is unavailable, but the limits and the most likely outcome are known.
Examples:
Generates an exponentially distributed random number with the specified rate parameter.
Basic Structure:
Description:
The RandExp function generates a random number following the exponential distribution with rate parameter (Lambda), representing the time between events in a Poisson process. This distribution is widely used to model waiting times, such as the time until the next phone call at a call center or the time to failure of mechanical components.
Common applications include modeling the time between arrivals in queue systems, reliability testing for time to failure of products, and other processes where events occur continuously and independently at a constant average rate.
Examples:
Generates a Gamma distributed random number.
Basic Structure:
Description:
The RandGamma function generates a random number following the Gamma distribution, characterized by shape (alpha) and scale (beta) parameters. The Gamma distribution is used for modeling waiting times for multiple events, such as the total rainfall accumulated in a year, or the load on web servers over time. It's useful when the event rate varies or when events occur in sequence.
Examples:
Generates a Beta distributed random number.
Basic Structure:
Description:
The RandBeta function generates a random number following the Beta distribution with parameters alpha and beta. This distribution is used to model events that have a limited range, such as probabilities that vary between 0 and 1. It's especially useful in Bayesian statistics, project management for task completion rates, and modeling proportions.
Examples:
Generates a random number according to a custom distribution.
Basic Structure:
Description:
The RandDist function generates a random number based on a custom distribution defined by vectors of x (values) and y (likelihood). This function allows for the modeling of complex, non-standard distributions that cannot be captured by pre-defined distribution functions. It's particularly useful for empirical distributions derived from data
Examples:
Sets the seed for the random number generator.
Basic Structure:
Description:
The SetRandSeed function sets the seed for the random number generator, ensuring reproducibility of random number sequences. You should place your call to setRandSeed in your model's Macros and Globals section so that it runs prior to other equations. This is useful for debugging simulations and for scientific research where replicating results is necessary. By setting the same seed, you guarantee that the sequence of random numbers generated will be the same across different simulation runs.
Use cases include initializing simulations to ensure consistent results for comparison, teaching scenarios where specific outcomes are expected, and research studies requiring reproducibility.
Note that changes to the simulation algorithm or model structure can affect the sequence of random numbers, even with the same seed.
Examples:
Agent Functions
Returns a vector of all the agents in the agent population.
Basic Structure:
Description:
The Find All function is used to retrieve every agent within a specified agent population. It's particularly useful for performing operations or analyses on the entire group of agents at once, without any need to filter based on conditions or states.
Use cases include calculating aggregate statistics (such as average health in a population), applying global changes (like an environmental factor affecting all agents), or initializing properties across all agents at the start of a simulation.
Examples:
Returns a vector of agents in the specified state.
Basic Structure:
Description:
The Find State function identifies all agents within a given population that are in a specific state. It's an important tool for segmenting agent populations based on their current conditions or behaviors. The matching agents are returned as a vector.
Common use cases include identifying all agents with a disease in epidemiological models, categorizing agents based on decision-making states in social simulations, or segregating resources by availability in logistics models.
Examples:
Returns a vector of agents not in the specified state.
Basic Structure:
Description:
The Find Not State function filters out agents within a population that are not in a given state, allowing for the exclusion of specific conditions or behaviors. The matching agents are returned as a vector.
Use cases include identifying susceptible individuals in a disease model or excluding specific roles in a workplace simulation.
Examples:
Returns an agent with the specified index. Agent indexes start at 1.
Basic Structure:
Description:
The FindIndex function retrieves a specific agent from a population based on its index. Indexes start at 1 and increase sequentially.
Example applications include tracking the first or last agent in a system, selecting specific agents for detailed analysis, or initiating events for particular individuals in a population model.
Examples:
Returns a vector of agents that are within the specified distance of a target agent or location.
Basic Structure:
Description:
The FindNearby function identifies agents within a certain distance from a target agent or location, facilitating the modeling of local interactions or influence zones. Matching agents are returned as a vector. It's particularly useful in spatially explicit simulations where proximity affects agent interactions, such as disease transmission, social influence, or resource competition.
Examples:
Returns the nearest agents to the target agent or location. The number of agents returned is specified by the optional Count.
Basic Structure:
Description:
The FindNearest function identifies the closest agent(s) to a specified target, either an agent or a location, with an optional Count parameter to specify the number of agents to return. If Count is omitted, only the closest agent is returned. The matching agents are returned as a vector.
Examples:
Returns the agent farthest from the target agent or location. The number of agents returned is specified by the optional Count.
Basic Structure:
Description:
The Find Furthest function identifies the agent(s) that are furthest away from a specified target, either another agent or a specific location. This function is useful in scenarios where distance or separation is a key factor, such as in spatial analysis, competition models, or emergency response planning. The optional Count parameter allows you to specify the number of farthest agents to return. If Count is omitted, only the furthest agent is returned.
Examples:
Returns the values of the specified primitive for each agent in the population as a vector.
Basic Structure:
Description:
The Value function retrieves the values of a specified primitive for each agent within an agent population, returning these values as a vector. This is particularly useful for aggregate analysis, statistical calculations, or when comparing or contrasting agents based on specific attributes.
Common use cases include analyzing the distribution of a particular trait within a population, such as age or income in demographic studies, or health status in epidemiological models.
Examples:
Sets the value of the specified primitive for each agent in the population to the given value. Can also be applied directly to an agent.
Basic Structure:
Description:
The SetValue function allows for the direct modification of a primitive's value for each agent within a population or for a specific agent. This is used in scenarios where an attribute needs to be updated based on simulation conditions or decisions, such as changing an agent's status, modifying resource levels, or adjusting positional data.
Examples:
Returns the location of an agent as the vector {x, y}.
Basic Structure:
Description:
The Location function retrieves the current spatial position of an agent, represented as an {x, y} vector. This function is useful for spatially explicit models where the position, movement, or distribution of agents plays a significant role in the system's dynamics.
Applications include tracking the movement of animals in ecological studies, monitoring the spread of individuals in epidemiological models, or analyzing traffic flow in urban planning simulations.
Examples:
Sets the location of the agent.
Basic Structure:
Description:
The SetLocation function assigns a new spatial position to an agent, specified by an {x, y} vector. This function is useful for simulating movement, migration, or any form of spatial redistribution of agents within a model.
It can be used to simulate animals moving towards resources in ecological models, people relocating in demographic simulations, or vehicles navigating in transportation systems. This direct manipulation of agent position supports dynamic spatial interactions and the modeling of complex behaviors based on geographical context.
Examples:
Gets the numeric index of an agent within an agent population. Indexes are sequential within a population and start at 1.
Basic Structure:
Description:
The Index function returns the position of an agent within its population, starting with 1. This sequential numbering is useful for identifying agents uniquely within a population..
Examples:
Returns the distance between two agents or locations.
Basic Structure:
Description:
The Distance function calculates the straight-line (Euclidean) distance between two points, defined by their {x, y} coordinates. This function is useful for spatial analysis, measuring proximity, or triggering interactions based on spatial separation in models.
Distance can also be passed agents in place of location vectors, in which case it will calculate the distance between the two agents.
Examples:
Moves an agent the amount specified.
Basic Structure:
Description:
The Move function changes an agent's position by a specified vector {x, y}, enabling the simulation of mobility, migration, and other forms of spatial dynamics.
Examples:
Moves an agent towards a target agent or location by the distance specified.
Basic Structure:
Description:
The MoveTowards function directs an agent towards a specified target agent or location by a given Distance. The target can be a set of coordinates or another agent, and the distance specifies how far the agent should move in the direction of the target on each invocation.
Examples:
Returns the agents connected to an agent in the network.
Basic Structure:
Description:
The Connected function retrieves a list of agents that are directly connected to a specified agent within a network. This function is used to analyze network structures, including social networks, supply chains, or ecological food webs. By understanding the connections between agents, modelers can simulate the spread of information, diseases, or resources through a network.
Examples:
Connects two agents in the network. The second agent can also be a vector of agents. Optionally, you can specify a connection weight which will be stored with the connection.
Basic Structure:
Description:
The Connect function establishes a connection between two agents within a network, optionally assigning a Weight to the connection. This is useful for simulations that involve network dynamics, such as social networks, ecosystems, or infrastructure systems. Connection weights can represent the strength or capacity of the connection, influencing the interaction between agents, such as the amount of resource flow or the intensity of communication.
Examples:
Unconnects two agents in the network. The second agent can also be a vector of agents.
Basic Structure:
Description:
The Unconnect function removes the connection between two agents in a network, or between an agent and a group of agents if the second argument is a vector. This function is used to simulate changes in network structure over time, such as the dissolution of social ties, the disruption of supply chains, or the loss of habitat connectivity.
Use cases include modeling the effects of social distancing on disease spread, analyzing the impact of infrastructure failure on logistics networks, or simulating habitat fragmentation in ecological systems.
Examples:
Returns the connection weight between two agents.
Basic Structure:
Description:
The ConnectionWeight function retrieves the weight of the connection between two agents in a network. This weight can represent various aspects of the connection, such as its strength, frequency, or capacity, depending on the model's context. It's used for simulations that require detailed analysis of the interactions within a network, enabling the quantification of relationships and flows between agents.
Examples:
Sets the connection weight between two agents.
Basic Structure:
Description:
The SetConnectionWeight function adjusts the weight of the connection between two agents in a network. Connection weights can represent the strength, influence, or capacity of the connection, impacting the dynamics of interactions within the network. For example, in a social network model, the weight might represent the closeness of a relationship; in a transportation model, it could represent the capacity of a route.
Examples:
The total number of agents in a population.
Basic Structure:
Description:
The PopulationSize function returns the total number of agents within a specified population. It can be used to trigger actions when the population reaches a certain size, to calculate per capita metrics, or to adjust resources based on population size.
Examples:
Adds a new agent to the population. If Base is set, the new agent will be a clone of Base Agent. Otherwise, the agent will be like a newly created agent at the start of the simulation.
Basic Structure:
Description:
The Add function introduces a new agent into the population. Optionally, Base Agent may be set to have the new agent can be a clone of an existing agent, inheriting its properties and state, or it can start with default properties.
Examples:
Removes an agent from the population. The agent will no longer be simulated. Can be used to "Kill" an agent.
Basic Structure:
Description:
The Remove function eliminates an agent from the simulation, ceasing its simulation activities. This is used to simulate death in biological models, the exit of individuals or entities in social or economic models, or the discontinuation of products in market models.
Examples:
The width of the geographic region an agent is within.
Basic Structure:
Description:
The Width function returns the width of the geographic region that an agent is within. This can be useful to calibrate behavior based on the size of the region.
Examples:
The height of the geographic region an agent is within.
Basic Structure:
Description:
The Height function provides the height of the geographic region an agent is within. This can be useful to calibrate behavior based on the size of the region.
Examples:
Vector Functions
Creates a vector with a range of sequential values going from start to end.
Basic Structure:
Description:
The Range operator creates a vector of sequential numbers starting from a specified Start value and ending at a specified End value. By default, it increments by 1. For custom step sizes, place the step size between the start and the end values, such as "0:0.5:10".
Examples:
The number of elements in a vector.
Basic Structure:
Description:
The Count function returns the number of elements in a vector. If multiple items are passed, they are Joined together into a single vector before counting.
Examples:
The number of elements in a vector.
Basic Structure:
Description:
The Length function returns the number of elements in a vector. It's used to determine the size of a vector.
Examples:
Selects one or more elements from a vector.
Basic Structure:
Description:
The Select function retrieves one or more elements from a vector based on the provided Selector. Selectors can be integers (to select by position), vectors of integers (for multiple positions), strings (for named vectors), or vectors of booleans (to select by condition). It's useful for extracting specific data points, subsetting vectors, or applying conditions to filter elements.
Examples:
Creates a copy of a vector with every element replaced by a value.
Basic Structure:
Description:
The Fill function copies a vector and replaces each element with Value. It preserves the vector's length, keys, and nested structure.
Examples:
Merges items together into a single vector.
Basic Structure:
Description:
The Join function combines multiple items into a single vector. Items can be numbers, strings, or other vectors. This function is useful for concatenating data from different sources or aggregating results.
Examples:
Flattens a vector removing and expanding all nested vectors.
Basic Structure:
Description:
The Flatten function converts a vector containing nested vectors into a single, flat vector. This operation is useful for simplifying data structures, preparing data for analysis, and ensuring compatibility with functions that require non-nested input.
Examples:
Returns a vector with duplicates removed.
Basic Structure:
Description:
The Unique function removes duplicate elements from a vector, returning a vector in which each element appears only once. It's useful for data cleaning, generating lists of distinct values, and preparing datasets for analysis.
Examples:
Returns the combined elements of two vectors (with duplicates removed).
Basic Structure:
Description:
The Union function merges two vectors, eliminating duplicate elements. This operation is useful for combining data sets, ensuring no repetition of elements.
Examples:
Returns the elements that exist in both vectors.
Basic Structure:
Description:
The Intersection function identifies and returns the elements common to both vectors.
Examples:
Returns the elements that exist in only one of the two vectors.
Basic Structure:
Description:
The Difference function computes the set of elements that are unique to each vector when comparing two vectors.
Examples:
Sorts a vector from smallest value to largest value.
Basic Structure:
Description:
The Sort function arranges the elements of a vector in ascending order, from the smallest to the largest value. Sort is used with vectors of numeric elements.
Examples:
Reverses the ordering of elements in a vector.
Basic Structure:
Description:
The Reverse function inverts the order of elements within a vector, making the last element become the first and vice versa.
Examples:
Takes a random sample from a vector. Allow Repeats determines whether the same index can be sampled multiple times and is false by default.
Basic Structure:
Description:
The Sample function randomly selects a specified number of elements from a vector. The option to allow repeats determines if elements can be chosen multiple times. It's used for simulations, bootstrapping statistical methods, and creating randomized subsets of data for analysis.
Examples:
Returns the position of the needle within the vector (starting with index 1). If the needle is not found, 0 is returned.
Basic Structure:
Description:
The IndexOf function searches for a specific element (needle) in a vector and returns its position, with indexing starting at 1. If the element is not found, it returns 0.
Examples:
Returns true if the needle is in the vector. Otherwise returns false.
Basic Structure:
Description:
The Contains function checks whether a vector includes a specified element (needle), returning true if the element is found and false otherwise.
Examples:
Creates a new vector by repeating an expression a specified number of times. 'x' in the expression refers to the current index. Times may also be a vector of strings in which case a named vector is created.
Basic Structure:
Description:
The Repeat function generates a vector by evaluating an expression multiple times, where each evaluation's result is determined by its current index (x). This is particularly useful for initializing vectors with calculated values or creating custom sequences. For example, generating a series of numbers squared, or setting up initial states in a model where each state's value depends on its position.
When used with a vector of strings, it produces a named vector, enabling the creation of more readable and structured data sets. In this case, key can be used to access the current element's key.
Examples:
Applies a function to each element of a vector and returns the result. The function may also be an expression where 'x' in the expression represents the current element and, for named vectors, 'key' represents the current element's key.
Basic Structure:
Description:
The Map function applies a specified function or expression to each element in a vector, transforming the original elements based on the function's logic.
The x variable represents the current element being processed, making it easy for operations that require element-wise manipulation, such as doubling values, converting units, or applying a mathematical formula. In the context of named vectors, key allows access to the current element's key.
Examples:
Tests each element of a vector using a function and returns the elements which evaluate to true. The function may also be an expression where 'x' in the expression represents the current element.
Basic Structure:
Description:
The Filter function screens each element of a vector through a given condition, returning a new vector composed only of elements for which the condition holds true. This is particularly useful for extracting subsets of data that meet specific criteria, such as filtering for values above a threshold, selecting specific items based on characteristics, or cleaning data.
The x variable represents the current element being processed, making it easy for operations that require element-wise filtering. In the context of named vectors, key allows access to the current element's key.
Examples:
Returns the keys for a named vector as a vector. Any element without a key will be omitted.
Basic Structure:
Description:
The Keys function extracts the keys from a named vector and returns them as a new vector.
Examples:
Returns the values of a vector (stripping away any keys if it is a named vector).
Basic Structure:
Description:
The Values function retrieves all the values from a vector, discarding any associated keys in the case of named vectors.
Examples:
Finds the Value in the Values Vector and returns the corresponding item in the Results Vector. If the exact Value is not found in the Values Vector, linear interpolation of the nearby values will be used.
Basic Structure:
Description:
The Lookup function matches a given value against a series of values and returns a corresponding result from a parallel vector of results. If the exact value is not found, the function interpolates linearly between the two closest values. This function is used for modeling non-linear relationships or when discrete data points need to be transformed into a continuous curve.
Examples include interpolating temperature effects on growth rates or calculating tax based on income brackets.
Examples:
Returns the source table data for a converter primitive.
Basic Structure:
Description:
The ConverterTable function retrieves the source table data of a converter primitive as a vector of x/y pairs.
Examples:
General Functions
Tests a condition and returns one value if the condition is true and another value if the condition is false.
Basic Structure:
Description:
The IfThenElse function evaluates a condition and returns a specified value if the condition is true, and another value if the condition is false. It is a fundamental control structure used to branch execution flow within a model, allowing for dynamic responses based on varying conditions.
Common use cases include decision-making within a simulation, such as changing parameters based on thresholds or switching between different states in a state-based model.
Examples:
Creates a pulse input at the specified time with the specified Height and Width. Height defaults to 1 and Width defaults to 0. Repeat is optional and will create a pulse train with the specified time if positive.
Basic Structure:
Description:
The Pulse function generates a discrete or continuous series of pulses in a simulation, useful for modeling events that happen instantaneously or over a set period. The pulse can be configured to repeat at regular intervals by setting Repeat. This function is commonly used to simulate periodic inputs like seasonal sales spikes, annual resource allocations, or irregular events like natural disasters.
The pulse is defined by its start time, height (magnitude), width (duration), and repeat interval. A width of 0 indicates an instantaneous pulse.
Examples:
Creates an input that is initially set to 0 and after the time of Start is set to Height. Height defaults to 1.
Basic Structure:
Description:
The Step function models a sudden change in a system's input at a specified Start time, where the input remains at the new Height indefinitely. It is useful for simulating scenarios like policy changes, investment injections, or environmental shifts. The function provides a simple way to model before-and-after effects of a single change within a system.
Typical use cases include step changes in funding, the introduction of new regulations, or sudden shifts in market demand.
Examples:
Creates a ramp input which moves linearly from 0 to Height between the Start and Finish times. Before Start, the value is 0; after Finish, the value is Height. Height defaults to 1.
Basic Structure:
Description:
The Ramp function linearly increases an input from 0 to a specified Height over a defined period (from Start to Finish). After the Finish time, the function remains at Height. This function is particularly useful for modeling transitions or growth patterns that do not happen instantaneously.
It is often used to simulate gradual policy implementations, phased project developments, or resource depletion over time.
Examples:
Pauses the simulation and allows sliders to be adjusted.
Basic Structure:
Description:
The Pause function temporarily halts the simulation, providing an opportunity to adjust parameters or examine the model's state more closely. This can be particularly useful during interactive sessions or presentations where real-time feedback is desired. It is often used in combination with IfThenElse function condition logic to pause the simulation at critical points or when specific conditions are met.
Common applications include educational settings, interactive games, or during stakeholder demonstrations to explore different scenarios.
Examples:
Immediately terminates the simulation.
Basic Structure:
Description:
The Stop function immediately ends the simulation, which is useful for stopping a model once a certain condition is met or an objective is achieved. This function is often used in conjunction with the IfThenElse function.
Use cases include ending a simulation upon reaching a target value, exceeding safe operational thresholds, or concluding a scenario analysis.
Examples:
String Functions
The length of a string in characters.
Basic Structure:
Description:
The Length function returns the number of characters in a string. This includes all letters, numbers, spaces, and punctuation marks.
Use cases for Length include validating input data and processing user inputs or data fields where the length of the string may affect the outcome (e.g., formatting a display).
Examples:
Obtains a certain character or set of characters.
Basic Structure:
Description:
The Range function extracts a substring from a string, given a range of character positions. The first character of the string is at position 1. This function is useful for parsing strings, extracting specific data from formatted text, or processing parts of user input.
Examples:
Splits a string into a vector at the locations of the Delimiter.
Basic Structure:
Description:
The Split function divides a string into a vector of substrings, based on the specified Delimiter. It's particularly useful for parsing CSV data, breaking down complex strings into manageable parts, or extracting specific information from formatted text.
For example, splitting a list of names separated by commas, breaking a sentence into words using spaces as delimiters, or parsing a date string into year, month, and day components.
Examples:
Finds the location of the first occurrence of the needle in the string.
Basic Structure:
Description:
The IndexOf function returns the position of the first occurrence of a specified substring (Needle) within a string. If the substring is not found, it returns 0. This function is useful for searching strings for specific data, verifying if and where a substring appears, or processing and analyzing text data.
Common use cases include finding the position of a character or phrase within a user input, validating formatting by checking for the presence of required characters, or parsing structured strings.
Examples:
Returns true if the needle is in the string. Otherwise returns false.
Basic Structure:
Description:
The Contains function checks if a string contains a specified substring (Needle) and returns true if it does, and false otherwise. This is particularly useful for validating input (e.g., checking for forbidden words or required terms), analyzing text for specific content, or filtering data based on text content.
Examples:
Uppercases all letters in a string.
Basic Structure:
Description:
The UpperCase function converts all the letters in a given string to uppercase. This function can be useful for normalizing text input, ensuring consistent case for string comparisons, or formatting text output for readability.
Examples:
Lowercases all letters in a string.
Basic Structure:
Description:
The LowerCase function converts all the letters in a given string to lowercase. It is often used to standardize text input, facilitate case-insensitive string comparisons, or achieve a uniform text format across documents or datasets.
Examples:
Combines the elements in a vector into a single string using the specified separator.
Basic Structure:
Description:
The Join function combines the elements of a vector into a single string, inserting a specified separator String between each element. This function is useful for concatenating a list of values into a readable format, generating comma-separated values (CSV) for data export, or creating compound keys from multiple attributes.
Examples:
Removes whitespace from both ends of a string.
Basic Structure:
Description:
The Trim function removes any leading and trailing whitespace from a given string. This is particularly useful for cleaning input data, preparing text for processing, or ensuring that comparisons and searches are not affected by extraneous spaces.
Examples:
Converts a string representation of a number to its numerical form.
Basic Structure:
Description:
The Parse function converts a string that represents a number into its numerical form. This is used for processing textual data that includes numerical information, such as user input, data imported from text files, or strings extracted from web sources.
Use cases include converting strings to numbers for mathematical operations, processing numerical data encoded as strings in imported datasets, and validating user input as part of data entry forms.
Examples:
Programming
Assigns a value to a reusable variable.
Basic Structure:
Description:
The Variables function allows for the declaration and assignment of a value to a variable within Insight Maker models. Variables are fundamental in creating dynamic models, enabling the storage and manipulation of values throughout the simulation. They can represent parameters, constants, or any other data type that may change or be referenced over time.
Variables are particularly useful for holding state information, intermediate calculations, or controlling the flow of execution within the model. By using variables, modelers can write more modular, readable, and reusable code.
Examples:
Test one or more conditions and selectively execute code based on these tests.
Basic Structure:
Description:
The If-Then-Else structure is a conditional statement that allows models to execute different sections of code based on whether a condition (or set of conditions) is true or false. This control structure is used for incorporating decision-making into models, enabling the simulation of complex, dynamic behaviors that depend on variable states and conditions.
Use cases include toggling between different equations based on threshold values, implementing policy changes in response to changing indicators, or simulating decision-making processes within agent-based models.
Examples:
Repeats an action until a condition is no longer true.
Basic Structure:
Description:
The While Loop executes a block of code repeatedly as long as a given condition is true. This structure is used for performing iterative calculations, simulating processes over time, or executing an action multiple times until a specific condition is met.
Examples:
Repeats an action for each element in a vector.
Basic Structure:
Description:
The For-In Loop iterates over each element in a vector, allowing for repeated operations on each element. This structure is used for processing collections of data where an operation needs to be applied to each item individually. Common use cases include summing the elements of a vector, applying transformations to data points, and aggregating results.
Examples:
Creates a reusable function.
Basic Structure:
Description:
The Functions feature allows users to define reusable code blocks. These blocks can be named and parameterized to perform specific tasks, such as calculations or data manipulations, with varying inputs. This promotes code reuse and modularity. Functions are fundamental in complex modeling, enabling the encapsulation of logic for tasks like mathematical operations, data processing, or custom simulation logic.
Examples:
Creates an anonymous function.
Basic Structure:
Description:
An Anonymous Function is a function without a name, directly assigned to a variable. These are particularly useful for short, one-off operations, or as arguments to higher-order functions like map, filter, or reduce.
Examples:
Anonymous Functions Single Line
Creates a single-line anonymous function.
Basic Structure:
Description:
Single-line Anonymous Functions offer a compact way to define a function inline without the need for explicit start and end indicators. Ideal for simple operations, these functions can be used directly in expressions or passed as arguments to other functions. They're particularly useful for transformations within map, filter, or similar functions.
Examples:
Raises an error if a condition is false.
Basic Structure:
Description:
The Assert function checks that Condition is true. If it is false, it raises an error using the optional Message. This is useful for validating assumptions, checking inputs, and stopping a model when an invalid state is reached.
Examples:
Passes an error message up to the nearest Try-Catch block or aborts the simulation with the error message.
Basic Structure:
Description:
The throw statement allows for explicit error generation within a model. When an error condition is met, throw can be used to halt execution and signal an error, optionally passing the error up to a Try-Catch block for handling. This is useful for validating inputs, enforcing constraints, or notifying when assumptions are violated. Proper error handling is useful for debugging and for creating robust, reliable models.
Examples:
Attempts to execute some code. If an error occurs, the error is passed as a string variable to the catch block which will then be executed. The catch block will not be executed unless an error occurs.
Basic Structure:
Description:
The Error Handling structure uses Try-Catch blocks to manage exceptions gracefully. When an error is thrown within the Try block, execution moves to the Catch block, allowing for custom error handling. The error message is available as a variable with the name specified immediately after the Catch statement. This structure is useful for robust models, enabling error management without halting the simulation. It's particularly useful for processing external data, complex calculations, and where operations may fail under certain conditions.
Examples:
User Input Functions
Show an alert dialog with the message.
Basic Structure:
Description:
The Alert function displays a pop-up alert dialog box with a custom Message provided by the user.
This function is useful for making models interactive. This is particularly useful for simulation games or interactive scenario analysis.
Examples:
Prompts the user for an input and returns it. Can optionally provide a default value for the input.
Basic Structure:
Description:
The Prompt function requests input from the user through a dialog box, displaying a message and optionally providing a Default value that the user can accept or overwrite.
This function is useful for making models interactive, allowing users to input parameters or make choices during a simulation run. This is particularly useful for simulation games or interactive scenario analysis.
Examples:
Prompts the user to confirm a statement and returns a boolean based on whether they confirmed it or not.
Basic Structure:
Description:
The Confirm function presents the user with a dialog box that asks them to confirm or deny a statement, returning a boolean value based on their choice.
This function is useful for making models interactive, allowing users to make choices during a simulation run. This is particularly useful for simulation games or interactive scenario analysis
Examples:
Statistical Distributions
Returns the value of x in the CDF of the Normal Distribution.
Basic Structure:
Description:
The CDFNormal function calculates the Cumulative Distribution Function (CDF) for a normal distribution at a given point x. The function uses the Mean and Standard Deviation of the distribution, which are set to 0 and 1 by default, respectively. This function is useful for calculating the probability that a random variable from a normal distribution is less than or equal to x.
Examples:
Returns the value of x in the PDF of the Normal Distribution.
Basic Structure:
Description:
The PDFNormal function computes the Probability Density Function (PDF) value of a given point x for a normal distribution characterized by a specific Mean and Standard Deviation. The PDF represents the likelihood of x occurring within this distribution. This function is used for statistical analyses, including hypothesis testing, and for modeling phenomena with normal (Gaussian) distributions.
Examples:
Returns the value of p in the inverse CDF of the Normal Distribution.
Basic Structure:
Description:
The InvNormal function calculates the inverse Cumulative Distribution Function (CDF) for a normal distribution. It returns the x value for which the area under the normal distribution curve to the left of x is equal to p. This function is useful for finding critical values in statistical tests and confidence interval calculations.
Use cases include determining z-scores for confidence levels in statistics, and calculating thresholds for hypothesis testing in research.
Examples:
Returns the value of x in the CDF of the Lognormal Distribution.
Basic Structure:
Description:
The CDFLognormal function computes the Cumulative Distribution Function (CDF) for a lognormal distribution at a specific point x. This distribution results when the logarithm of a variable is normally distributed, making it ideal for representing variables that are bound to be positive, such as stock prices or lifetimes of components.
Examples:
Returns the value of x in the PDF of the Lognormal Distribution.
Basic Structure:
Description:
The PDFLognormal function calculates the Probability Density Function (PDF) for a lognormal distribution at a specific point x. This function is useful for determining how likely a specific value is within a distribution that's positively skewed, such as population sizes or the size of organisms.
Examples:
Returns the value of p in the inverse CDF of the Lognormal Distribution.
Basic Structure:
Description:
The InvLognormal function calculates the inverse Cumulative Distribution Function (CDF) for a lognormal distribution. It finds the x value for which a given portion p of the distribution lies to the left.
Examples:
Returns the value of x in the CDF of Student's t Distribution.
Basic Structure:
Description:
The CDFt function computes the Cumulative Distribution Function (CDF) for Student's t-distribution at a given point x, with a specified number of Degrees Of Freedom.
Examples:
Returns the value of x in the PDF of Student's t Distribution.
Basic Structure:
Description:
The PDFt function calculates the Probability Density Function (PDF) for Student's t-distribution at a specific value x, given a number of Degrees Of Freedom. This distribution allows for the analysis of small sample sizes and is particularly useful when the population variance is unknown.
Examples:
Returns the value of p in the inverse CDF of Student's t Distribution.
Basic Structure:
Description:
The Invt function calculates the inverse Cumulative Distribution Function (CDF) for Student's t-distribution, returning the x value associated with a given probability p and a specific number of Degrees Of Freedom. This is useful for critical value calculations in statistical tests.
Use cases include determining the cutoff values for t-tests when comparing sample means or calculating confidence intervals for mean differences.
Examples:
Returns the value of x in the CDF of the F Distribution.
Basic Structure:
Description:
The CDFF function calculates the Cumulative Distribution Function (CDF) for an F distribution at a given point x, using specified degrees of freedom for the numerator (Degrees Of Freedom1) and the denominator (Degrees Of Freedom2).
This function is used for statistical modeling, especially in variance analysis (ANOVA) where it helps determine if the variances between two populations are significantly different.
Examples:
Returns the value of x in the PDF of the F Distribution.
Basic Structure:
Description:
The PDFF function computes the Probability Density Function (PDF) for an F distribution at a specific point x, using Degrees Of Freedom1 for the numerator and Degrees Of Freedom2 for the denominator.
Examples:
Returns the value of p in the inverse CDF of the F Distribution.
Basic Structure:
Description:
The InvF function finds the inverse Cumulative Distribution Function (inverse CDF) value for a given probability p, within an F distribution characterized by Degrees Of Freedom1 and Degrees Of Freedom2. This function is used for statistical analysis, particularly in determining critical values for hypothesis tests involving ANOVA.
Examples:
Returns the value of x in the CDF of the Chi-Squared Distribution.
Basic Structure:
Description:
The CDFChiSquared function computes the Cumulative Distribution Function (CDF) for a chi-squared distribution at a specified point x, with a given Degrees Of Freedom. This function is instrumental in statistical tests, especially for goodness-of-fit tests and in chi-squared tests for independence.
Examples:
Returns the value of x in the PDF of the Chi-Squared Distribution.
Basic Structure:
Description:
The PDFChiSquared function calculates the Probability Density Function (PDF) for a chi-squared distribution at a specific point x, given Degrees Of Freedom. Used for statistical analysis, it aids in understanding the distribution of chi-squared statistics across different degrees of freedom.
Examples:
Returns the value of p in the inverse CDF of the Chi-Squared Distribution.
Basic Structure:
Description:
The InvChiSquared function retrieves the inverse Cumulative Distribution Function (inverse CDF) value for a given probability p in a chi-squared distribution, specified by Degrees Of Freedom. It's vital for determining critical values in hypothesis testing, particularly in chi-squared tests.
Examples:
Returns the value of x in the CDF of the Exponential Distribution.
Basic Structure:
Description:
The CDFExponential function calculates the Cumulative Distribution Function (CDF) for an exponential distribution at a given value of x. This distribution is characterized by its Rate parameter, which represents the rate of events per unit time. The function is useful for modeling time until the next event in processes that are memoryless, such as the time between arrivals in a queue.
Examples:
Returns the value of x in the PDF of the Exponential Distribution.
Basic Structure:
Description:
The PDFExponential function calculates the Probability Density Function (PDF) for an exponential distribution at a given value of x. This function helps in understanding the likelihood of a particular time between events for processes that have a constant rate, represented by the Rate parameter.
Examples:
Returns the value of p in the inverse CDF of the Exponential Distribution.
Basic Structure:
Description:
The InvExponential function calculates the inverse Cumulative Distribution Function (CDF) of an exponential distribution for a given probability p. This function is useful for determining the time until an event occurs with a certain probability, given the constant rate of occurrence. It's particularly useful in simulations and probabilistic models to determine thresholds or critical values.
Examples:
Returns the value of x in the CDF of the Poisson Distribution.
Basic Structure:
Description:
The CDFPoisson function calculates the Cumulative Distribution Function (CDF) for a Poisson distribution at a given value of x. The Poisson distribution is characterized by its Lambda parameter, which represents the average rate of events per interval.
Examples:
Returns the value of x in the PMF of the Poisson Distribution.
Basic Structure:
Description:
The PMFPoisson function calculates the Probability Mass Function (PMF) for a Poisson distribution at a given value of x. This function is useful for modeling the probability of observing exactly x events in a fixed interval, given the average rate (Lambda) of these events. It's particularly valuable in scenarios where events occur independently and at a constant average rate over time.
Examples:
