Header Image - MCM Alchimia 5

NegBinomial or Negative Binomial distribution

by admin 0 Comments

The NegBinomial distribution is discrete distribution, defined in the domain of positive integers. It is similar to the binomial distribution except that the n parameter refers to non-total and incomplete events. In other words, a random variable with NegBinomial distribution of parameters n and p represents the number of successes whose probability is p, which are achieved in a sequence of n failed trials. The parameters by means of which this distribution is defined have the same form as those that represent the Binomial distribution, although, as we said, the parameter n represents a different quality.

Input parameters:

  • n. Number of failures until the trial stops, for which it is wanted to find the number of successful trials. This parameter must be an integer greater than zero, although the software will accept positive reals (those will be truncated).
  • p. Probability that the trial will be successful. Take real values between 0 and 1.

More help

Binomial distribution

by admin 0 Comments

Dies ist eine diskrete Verteilung, deren Domäne die Menge positiver Ganzzahlen ist, die die Anzahl der in einer Folge von n Versuchen erzielten Erfolge darstellt. Diese Tests müssen dichotom sein, dh sie bieten nur zwei Möglichkeiten (Erfolg und Misserfolg) und haben eine definierte Erfolgswahrscheinlichkeit = p.

Eingabeparameter:

  • n. Anzahl der durchzuführenden unabhängigen Tests. Dieser Parameter muss eine ganze Zahl größer als Null sein.
  • p. Wahrscheinlichkeit, dass die Studie erfolgreich sein wird. Nehmen Sie reale Werte zwischen 0 und 1.

More help

Poisson distribution

by admin 0 Comments

The Poisson distribution is a discrete distribution defined for the domain of integers greater than zero. It is used mostly to represent the probability that a certain number of events will occur in a period of time, a defined distance, area, volume, etc.,

Input parameters:

  • λ. This parameter greater than zero represents the number of instances in which the phenomenon studied occurs in a given interval. It also represents the mathematical expectation of the random variable.

More help

Beta distribution

by admin 0 Comments

Beta.

This distribution is a continuous function with two parameters which must take real values greater than zero. The function is defined between 0 and 1. A particular case of the Beta distribution is when both form parameters take values = 1. In this case the function will coincide with a uniform distribution.

Input parameters:

  • a, b. Shape parameters. They must be both real numbers greater than zero.

More help

Exponential distribution

by admin 0 Comments

Exponential ditribution.

The exponential probability distribution is a continuous function in the domain of positive reals, which is suitable to represent the time between two events that are distributed according to the Poisson distribution. For example, the elapse until a trade receives its first customer of th day. The exponential distribution is a particular case of the Gamma distribution where shape parameter takes value 1.

Input parameters:

  • Mean value. This parameter must be a real number > 0 and defines the position of the mean value of the distribution. Since this is a case of the Gamma distribution, in terms of the latter, the mean would correspond to the Scale parameter if a Gamma with shape = 1 is used. In this case, the resulting probability distribution will be the same.

More help

Gamma distribution

by admin 0 Comments

Gamma distribution.

This distribution is a continuous function of biased character, that is, where the modal value does not correspond to the mean value. The Gamma distribution is a generalization of the exponential distribution, and is used in general to model random variables that represent the time in which an event occurs a certain number of times.

The pseudo-random generated by the application are an approximation (G. Marsaglia and W. Tsang) with a single input parameter called “shape”, which must be a positive real number. From version 3.2 it is possible to describe gamma functions with any standard deviation (using the second parameter named scale).

Input parameters:

  • Shape. This parameter defines the shape of the distribution. You can take as a value any number greater than zero, from field of real numbers.
  • Scale. This second parameter allows you to scale the resulting values ​​from the standard Gamma distribution, where this parameter is always 1. In this way it is possible to generate pseudo-random values with the same shape but with a greater standard deviation.

More help

Most common distribution functions

by admin 0 Comments

MCM Alchimia has a specific module for the generation of pseudo-random numbers. That is not only with classical distribution functions that allow the representation of common scenarios in risk analysis and ecomomy that contain most software of its type, but also functions used in different branches of science, covering most of the experiments developed in any analytical laboratory.

Among the most common distribution functions we can mention the following:

 

Tips and tricks when using MCM Alchimia

by admin 0 Comments

While MCM Alchimia can be used in any scope that requires Monte Carlo simulations, the tool has been created with the measurement uncertainty analysis in mind. This is why many of the predesigned options are unique in this software and will not be found in any similar applications (experimental distribution, analysis of calibration curves, or the result in classic GUM format according with JCGM 100). Below we detail some tips and tricks for you to become an expert in the use of the application and allow more reliable and faster results in no time.

1 .- Recommended workflow
While the application is very intuitive it is always good to follow a sequence of work to ensure both the accuracy of the calculations as well as the efficiency in the use of time. The work’s methodology can be summarized in the following stages.

  1. Definition of the mathematical model of the measurand. In this stage, the basic model (equation) of our trial is defined, just as we usually perform the calculations, or like is recommended in our reference documents.
  2. The breakdown of input quantities into sources of uncertainty. It is necessary to evaluate all the sources of uncertainty that make up each input quantity. For example, when using a measuring instrument at least two sources of uncertainty will be had, one due to calibration and another due to the resolution (or division) of the equipment. But there may also be taxpayers for additional evaluations (for instance repeatability). We recommend a Cause-Effect diagram to see in general the taxpayers of the model.
  3. Write an additional equation in subsequent rows for each magnitude of the basic model that has more than one source of uncertainty using the prefix “S” for the components that will take value = 0 and will only be included by uncertainty. This is best explained in the next item.
  4. Verify that, in each written equation, the number of parentheses opening is equal to the number of parentheses closing.
  5. It is convenient before assigning the values ​​and distributions to make a table on paper with the columns:
    Variable / Units / Value (Mean) / Probability distribution / Standar deviation (or semi-interval).
    This will allow to see each components in the generality of the model. These data will then be typed in Step 3.
  6. Following these steps will ensure success in your estimation. Remember that the use of time in your project will be 80% dedicated to the correct design of the mathematical model (the test equation).

2 .- Divide large models into several simple equations

The powerful equation editor of MCM Alchimia infinite allows you to write an unlimited number of equations in the text area. It is not necessary to write the entire mathematical model of the essay in a single line. To avoid making errors of parenthesis balance or others difficult to find at the end, it is advisable to start with a basic model that contains general variables and then write specific equations for each base quantity. You can see the example of a solved model, later in the help, which is done just in this way.

3 .- Equation editor rules

Even though is possible to represent any model with MCM Alchimia, the equation editor has some rules that it is good to remember to avoid sintax errors.

  • All equations must be written in the format [measurand] = f([variable 1],[variable 2],…,[variable n]), that is, both members of the equation must be included.
  • There can only be one magnitude of output in the model (measurand)
  • The output magnitude must be on the first line
  • It is not allowed to put “;” at the end of the line, the carriage return (enter) at the end of the line is enough to separate equations
  • It is not allowed to put two equations with the same intermediate result.
  • The editor allows ASCII characters (uppercase letters, lowercase letters, numbers and sub-characters and special characters of the virtual keyboard that can be displayed with the αβ button. Example of variable names can be “Vol_p”, “Temp2”, “δ_724”, “Δt”, etc. It is not allowed variable names like “2_t” (by number at start) or “ABS” (since it is a restricted term, it is a function)
  • Variable names must be started with an alphabetic character and moreover, numbers can not be used at the beginning of the name.
  • Variable names are case-sensitive.
  • There are reserved terms that correspond to functions, which can not be used as variable names.
  • The f(s) link on the area of ​​equations opens a keypad of functions that can be used directly in the model. If a portion of the equation is marked and then a function is selected with the keypad, this portion of the equation will remain as a parameter of the function.

4 .- How to include variables with various uncertainty contributors

A very common case in tests and calibrations is that the magnitudes have more than one source of uncertainty. For instance, the use of a measurement instrument may present several uncertainty contributions due to its calibration, resolution, repeatability, etc. To include all these sources of uncertainty, there are two ways to proceed:

  1. The magnitude can be broken down into as many addends as sources of uncertainty. The first one will take the measured or read value (as average) and the rest will be zero-centered distributions (average value = 0) since they will only be used to evaluate the uncertainty and will not influence the result. E.g. a temperature taken 10 times providing uncertainties for calibration, resolution and repeatability can be expressed as:
    T = T_cal + ST_res + ST_rep.
  2. The other option is to break down the magnitude into a constant and then the uncertainty contributors, all with average value = 0. Following the previous example would be:
    T = T_value + ST_cal + ST_res + ST_rep

Note that the variables for uncertainty, which will take zero value, were written with an initial S. While they can take any name, it is good practice to differentiate names with a common criteria like this. In this way, the structure of the model can be known already from the name of the variables.

5 .- Type A uncertainties with MCM Alchimia

A very common error in the use of the Monte Carlo method for the estimation of uncertainties is the assignment of the Normal Distribution Function to the magnitudes that present “type A” uncertainties, assigning, as standard deviation, the standard deviation of the readings.

This will yield erroneous uncertainty results (sub-estimates) due to the fact that little information about the population is taken into account, that is, the “degrees of freedom” as used in the GUM approach. By putting the calculated standard deviation directly, it is assuming that this magnitude has infinite degrees of freedom, which is not correct.

There are three ways to include correctly type A uncertainties in MCM Alchimia

  1. The JCGM 101 Evaluation of measurement data guide – Supplement 1 to the. “Guide to the expression of uncertainty in measurement” , indicates that for type A uncertainties a Student t distribution (scaled and shift) should be used, instead of a Gaussian one. For this distribution it should be indicated, as a parameter, the degrees of freedom, so that the level of information that you have of the magnitude will be included.
  2. In case you want to use the normal distribution, it can also be done, although as a standard deviation the deviation calculated in our test should be entered, multiplied by the coverage factor for our degrees of freedom and 95.45% coverage probability (inverse t distribution), divided 2. This simple operation will allow simulation taking into account the degrees of freedom of the magnitude.
  3. Our recommendation. An Exclusive specification of MCM Infinite Alchimia, is the inclusion of an FDP called Experimental. This powerful panel allows us to work with type A uncertainties directly from the raw values ​​of our test, without the need to calculate any standard deviation or other operation on our part. Using this option, the application will automatically deal with the problem of degrees of freedom, standard deviations, etc. They can even be used for more complex repeatability models, for Sample / Standard / Sample and others.

More help

First project – Results

by admin 0 Comments

When the Start Simulation button is pressed, a bar can be seen under the button that continuously indicates the progress of random sampling. After completing the simulation with the indicated data, the application is automatically located in the results panel.

This panel shows a graphic selector at the top left, which allows to toggle between the results of the Monte Carlo simulation and the analysis according to the GUM approach, which is also estimated as well in all cases.

Next, we analyze the information provided by the MCM results view:

  1. Name of the application.
  2. Software version.
  3. Time involved by the application in obtaining results (in mm.ss, minutes and seconds)
  4. Technical data, with the text that we indicated in Step 1
  5. Number of iterations. 500 000 in our case.
  6. Statistical analysis of simulation
    1. Media = 100.04111
    2. Variance = 1.947357e-4
    3. Standard deviation = 1.39548e-2
    4. Skew = -1.01559e-3
    5. Kurtosis = 2.64392
    6. Maximum value = 100.11192
    7. Minimum value = 99,97472
    8. Median = 100.0396
    9. Range = 0.1372
  7. Normality Test (Jarque – Bera) = 2641.5964 (does not fit)
  8. Result = 100.04111. This indicates the result of the calibration without rounding figures.
  9. Confidence interval (p = 95.45%): [100.01376, 100.06841] (Half-width of the interval = 2.733e-2)
  10. Classic format: 100.041 ± 0.027 ml. This represents the test result and its associated expanded uncertainty for the coverage probability indicated in step 3. Note that this is not the result from GUM framework but the MCM results expressed as usual in GUM framework
  11. List of contributions to the uncertainty for each parameter of the model.
  12. Section with input data and mathematical model describing completely what was entered when creating the simulation project.


More help