# 2.13.1.5 distfit (Pro)

## Contents

Statistics: Descriptive Statistics: Distribution Fit

## Brief Information

Fit parametric distribution to data

Minimum Origin Version Required: Origin 2015 SR0

This feature is OriginPro only.

## Command Line Usage

 1. distfit stat.moment:=0 stat.sum:=1 test.mtest.mean:=35 test.mtest:=1 dist.wb:=1 dist.gamma:=1 plot.plotinone:=1 ksmod:=1 plotdata:=<new>;//Carry out distribution fit on the active data range 

2. distfit irng:=[Book1]Sheet1!B group:=[Book1]Sheet1!A stat.perc:=0 stat.sum:=1 stat.kurt:=1 test.mtest:=0 test.stest.var:=20.14 test.stest.cis:="" test.stest:=1 type:=1 dist.bino:=1 plot.cdf:=1 ks:=1 plotdata:=<new>; 

 

## Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Data Range irng

Input

Range

<active>

Specifies the input data range, could be multiple columns.

Grouping Range group

Input

Range

<unassigned>

Specifies the grouping range (optional), only one column can be specified.

Basic Statistics stat

Input

TreeNode

<unassigned>

Specify whether to output a specified descriptive statistics quantities. Each sub node controls refers to a quantity. Available sub nodes includes:

• perc:The quantiles values, which include minimum, 1st quartile(Q1), Median, 3rd quartile(Q3), maximum, interquartile range (Q3 - Q1), range (maximum - minimum)
• moment:The moments, which include N, N missing, mean, standard deviation(SD), SE of mean, lower/upper 95% CI of mean
• var:The variance
• sum:The sum
• skew:The skewness
• kurt:The kurtosis
• cv:The coefficient of variation
• ss:The uncorrected sum of squares
• css:The corrected sum of squares
• mode:mode
Basic Tests test

Input

TreeNode

<unassigned>

Specify whether to carry out t-test or z-test or none, and also specify the test conditions. Available sub tree nodes are:

• mtest: Specify whether to carry out mean test. 0: No, 1: t-test, 2: z-test.
mtest.mean:The hypothetical mean to be tested.
mtest.tail:The alternate hypothesis. 0: Mean <>Test Mean, 1: Mean >Test Mean, 2: Mean <Test Mean
mtest.std: Specify the standard deviation value, which will be used in the z-test. (.mtest = 2)
mtest.cim: Specify whether to compute the confidence interval for the mean.
mtest.cim.level: Specify the confidence interval levels in percentage values. e.g. 95 means 95% confidence level.
• stest: Specify whether to carry out Chi-Square Test for Variance.
stest.var: Specify the hypothetical variance to be tested.
stest.tail: Specify the alternate hypothesis. 0: Variance <> $\boldsymbol{\sigma}_0$, 1: Variance > $\boldsymbol{\sigma}_0$, 2: Variance < $\boldsymbol{\sigma}_0$.
stest.cis: Specify whether to compute the confidence intervals for sample variance.
stest.cis.level: Specify the confidence interval levels in percentage values. e.g. 95 means 95% confidence level.
Distribution Type type

Input

int

0

Specify whether continuous distribution or discrete distribution to be performed.

Option list:

• 0:Continuous Distribution
• 1:Discrete Distribution
Distributions dist

Input

TreeNode

<unassigned>

Select one or multiple distribution to be fit for the input data. See the Origin Help page for different distributions. Each sub node refers to a distribution, available sub nodes include:

For continuous distribution:

• norm:Normal
• logn:LogNormal
• wb:Weibull
• exp:Exponential
• gamma:Gamma

For discrete distribution:

• bino:Binomial
• poi:Poisson
Sample Size sample

Input

string

"10"

Only available when Binomial distribution is used (dist.bino = 1), to specify the sample size for this distribution.

Plots plot

Input

TreeNode

<unassigned>

Specify whether to output certain type of plots in the report sheet. Each sub node refers to a plot type, available sub nodes are:

• box: Box Chart
• hist: Histogram
• cdf: Cumulative Distribution Function Plot
• pp: Probability Plot (only available for continuous distribution)
pp.sig: The significance level of probability plot.
• plotinone: Specify whether to arrange plots from multiple data ranges in one graph, which helps to compare the multiple data range. Please note that in the graph histogram will be stacked and with same bin size.
Kolmogorov-Smirnov ks

Input

int

0

Specify whether to perform the Komogorov-Smirnov test.

Kolmogorov-Smirnov (Modified) ksmod

Input

int

0

Specify whether to perform the Modified Komogorov-Smirnov test.

Input

int

0

Specify whether to perform the Modified Anderson-Darling test.

Distribution Fit Report rt

Output

ReportTree

<new>

Specify the worksheet to output the distribution fit results.

Plot Data plotdata

Output

ReportData

<optional>

Specify a worksheet to output the plotted data (Origin generates tabular data when plots are created).

## Description

You can refer to the Distribution Fit chapter in Origin Help under Statistics >> Descriptive Statistics.

## Algorithm

You can refer to the Origin Help file for detailed algorithm.

Keywords:normal, lognormal, weibull, exponential, gamma, binomial, poisson, cumulative distribution, probability plot