Questions on the statistical functions of Mathematica.

learn more… | top users | synonyms

16
votes
5answers
6k views

Estimate error on slope of linear regression given data with associated uncertainty

Given a set of data, is it possible to create a linear regression which has a slope error that takes into account the uncertainty of the data? This is for a high school class, and so the normal ...
4
votes
2answers
215 views

How to find the variance under the assumption that x follows some probability distribution

I am aware that we can find the expectation under the assumption that x follows some probability distribution, something like this: ...
1
vote
1answer
449 views

Problem with Estimating the parameters value of gamma distribution

can anyone please help me with this problem? I am trying to estimate parameters of gamma distribution (fitted into a set of data). Following are my command and the output produced by mathematica: ...
2
votes
2answers
431 views

Total Variation Distance of probability matrix

How can I calculate the Total Variation Distance of a transition Matrix? is there any built in function? I've searched all documentation and haven;t found anything. ** More information: Let me try ...
3
votes
1answer
706 views

stationary distribution of a transition matrix

How can I solve the stationary distribution of a finite Markov Chain? In other words, how can I estimate the eigenvectors of a transition matrix?
9
votes
1answer
334 views

BUGS-type calculations in Mathematica

Recently I have been teaching myself how to Bayesian calculations with the BUGS language (JAGS, in particular). However, I find myself wondering how one might use Mathematica to do similar ...
4
votes
2answers
413 views

How to fit one distribution to another?

I have a custom distribution created to model some experimental observations. While too complicated to include in this question, I can provide an example and some illustrations to convey a sense of ...
4
votes
2answers
495 views

Clustering a bivariate data set with Mathematica

I need to partition a bivariate data set into predetermined "n" clusters and, at the same time, to fix the centroid position of each cluster. Is the ...
13
votes
2answers
995 views

Obtaining joint distributions and conditional distributions using Mathematica

I have two multivariate Gaussian distributions $p(x)$ and $p(z)$ with mean vectors $m_x$ and $m_z$, and covariance matrices $\Sigma_x$ and $\Sigma_z$. my model is a simple linear model $x = W z+n$ ...
7
votes
1answer
872 views

Probability and distribution from actual data

Let's say I have some data from a real world system: ...
1
vote
2answers
274 views

Calculating the Mean of a Truncated Multinormal Distribution

First, I'm a little disappointed that Mathematica balks at: Mean[TruncatedDistribution[{{0, Infinity}},MultinormalDistribution[{0}, {{1}}]]] Second, is the ...
14
votes
3answers
832 views

How can I tell mathematica to generate an histogram from nominal data?

If I write: Histogram[{1, 1, 1, 2, 2, 2}] I get a nice histogram chart but if I write ...
3
votes
2answers
150 views

How to change type order in PearsonDistribution?

I need to estimate a Pearson distribution from a batch of tables tab: ...
15
votes
1answer
273 views

Polynomial expectations of generic distributions

Summary Polynomial expectations depend only moments and cross moments of a multivariate distribution. I would like to use Expectation to compute polynomial ...
14
votes
1answer
534 views

Detecting and counting signals in list data: checking pulse rate

Hope this isn't too much of a basic question: I'm looking for some Mathematica functions, but I don't know which ones. Background I recently read about a simple technique for reading your body's ...
11
votes
1answer
1k views

Persistence length of a polymer chain

I'm trying to calculate the persistence length (Lp) of a polymer chain using Mathematica. The first and simplest method is to compare the EuclideanDistance between ...
4
votes
1answer
110 views

NExpectation not up to expectations with Boole or Conditioned

Context I am interested in computing numerically the number of extrema at a given threshold for random fields. These numbers are expectations of MultinormalDistributions. Problem This integral ...
11
votes
1answer
186 views

How does bandwidth selection work for low-variance dimensions with KernelMixtureDistribution?

I am puzzled because this toy example (in Mathematica 8) ...
6
votes
0answers
378 views

Sensitivity Analysis: Global Sensitivity and Screening

I have a model which accepts several input parameters and now I want to study the sensitivity to certain parameters as described in here: Cross Validated Answer and in Wikipedia. There is also a link ...
7
votes
1answer
269 views

WinBUGS Interface

Has anyone created on WinBUGS (Bayesian inference Using Gibbs Sampling) interface with Mathematica similar to BugsXLA for Excel? I'd like to setup the model, define the evidence in a notebook and then ...
1
vote
2answers
191 views

Expectation over a list with nested-mapped expressions

I need expected values of a list where the random variable to take expectations over should be an input into expressions defined earlier. I suspect Set[] and SetDelayed[] tripped me. (Or Map and ...
2
votes
3answers
227 views

How to Compute Aggregate Best and Worst Cases for a Large Number of Estimates?

I need to aggregate multiple estimations, but I haven't been able to find a built-in function in Mathematica that aggregates multiple probablity estimations (I am specially interested in estimations ...
11
votes
1answer
454 views

Using ANOVA with a “Repeated measures” / “Within-subjects” design

Repeated measures designs or "Within-Subjects" designs are very important in live sciences and social sciences. Unfortunately, Mathematica's ANOVA package is not able to analyze those designs. It only ...
6
votes
1answer
316 views

Support for Multidimensional Scaling (MDS)?

Does mathematica support MDS? Or, are there any libraries that support it? Basically, I have points and a distance function defined between them, and I want to plot them in 2D space, trying to ...
9
votes
3answers
462 views

Different calculation of median and quartiles, bug in BoxWhiskerChart?

When you plot a dataset with BoxWhiskerChart passing over the box in the plot with your mouse pointer shows some specifics about the dataset (min and max values, ...
8
votes
2answers
655 views

What is the Mathematica equivalent for the Excel function tinv()?

TINV() returns the t-value of the Student's t-distribution as a function of the probability and the degrees of freedom. For example ...
16
votes
3answers
2k views

Standard errors for maximum likelihood estimates in FindDistributionParameters

I am trying to fit a non-standard PDF to data and FindDistributionParameters works great, and gives me the parameters of the distribution back using maximum ...
8
votes
2answers
507 views

Bayesian Inference with Continuous prior distribution

Assume that we have a prior distribution for the probability of success as follows. p = BetaDistribution[6, 14] which we can graph as this ...
23
votes
1answer
496 views

How to augment the realm of functions Mathematica thinks it knows how to integrate symbolically

My question involves extending the functionality of Integrate over specific integrals in the most generic manner. Specifically, is it possible to "hack into" ...
10
votes
2answers
3k views

Performing a chi-square goodness of fit test

How would I perform a chi-square goodness of fit test? I have tried the following, where my data consists of the observed values whilst the data pair contains the correct values. Then I use the ...
7
votes
1answer
824 views

Wald–Wolfowitz Runs Test

Does Mathematica 8 implement Wald–Wolfowitz runs test for randomness? I can't find it in the documentation. I would like to test some fit residuals.
12
votes
1answer
170 views

NExpectation behaves oddly with EmpiricalDistribution

Note: this is fixed in version 9. My question concerns the usage of NExpectation and Expectation and why I see the behavior I ...
7
votes
3answers
2k views

Doing a chi-square independence test in Mathematica

I have a matrix consisting of the following data: Needs["HypothesisTesting`"] data = {{11, 206}, {32, 1374}} How would I make a chi-square independence test ...
2
votes
2answers
260 views

Non-linear trend reduction with missing data

How can I reduce a non-linear trend of some data series if there are parts of "no data", represented by the value 99999? For example: ...
10
votes
2answers
323 views

What do the options of SmoothKernelDistribution do?

The function SmoothKernelDistribution has three options that are not described in too much detail in the Mathematica's help window. InterpolationPoints: What is ...
5
votes
3answers
474 views

Creating word histograms from lists of strings

Consider the following: ...
18
votes
4answers
2k views

Efficiently generating n-D Gaussian random fields

I am interested in an efficient code to generate an $n$-D Gaussian random field (sometimes called processes in other fields of research), which has applications in cosmology. I wrote the following ...
0
votes
1answer
299 views

How can an InverseQuantile or an interval valued Quantile function be implemented in Mathematica?

Quantile[] is the workhorse method in robust data analysis and statistics (see, eg Koenker's Quantile Regression). However, it should be complemented by an ...
5
votes
4answers
440 views

Identifying subsets with minimal standard deviation

Consider the following: ...
8
votes
1answer
389 views

Random variables with transformed discrete distributions cannot be applied to Probability[] function?

I have two discrete uniform distributions over same support: Dx = DiscreteUniformDistribution[{-8, 8}]; Dy = DiscreteUniformDistribution[{-8, 8}]; I use ...
9
votes
1answer
225 views

What default theoretical distribution does Mathematica use in PearsonChiSquareTest?

I used Mathematica's function PearsonChiSquareTest to test whether the data were drawn from a normal distribution. As in the reference, I expected Mathematica to compare the result to a normal ...
3
votes
2answers
656 views

Is there a function to calculate studentized range?

Is there a built-in function for studentized range or do I have to build it myself? Is there a test of normality for the studentized range?
25
votes
3answers
2k views

Histograms with pre-counted data

I've got some large data sets which have been counted but not binned already - essentially, a list of pairs of values (not bins) and counts.* (Or, equivalently, it's been binned into too-small bins.) ...
7
votes
1answer
570 views

How do I calculate the probability of reaching mean residual life

I need to understand the Survival Analysis concept of "mean residual life (MRL)" and calculating probabilities for reaching it. From another discussion: The MRL at time t is the mean additional ...
10
votes
1answer
387 views

Cluster analysis returns questionable results

A few weeks ago I ran a cluster analysis on some economic data and (unfortunately only) now I found out that some results do not make sense. For instance I analyzed the development of unemployment ...
6
votes
2answers
2k views

Function to compute the probability of exactly one event occurring out of N independent events

Is there a built in function (or a function in one of the standard packages) that allows you to compute the probability of exactly one event occurring out of some known set of probabilities for N ...
7
votes
1answer
278 views

RandomVariate with a Discrete Distribution

Nature has provided me with a random variable $Z$ taking on the values $0, 1, 2, \ldots$, with probabilities $z_0, z_1, \cdots$. I can sample from the distribution of $Z$ reasonably efficiently (I ...
8
votes
2answers
491 views

Most efficient way to obtain samples from high-dimensional multivariate distributions?

Is MultinormalDistribution[] efficient and easy to use for high dimensions? I have a variable $n$ representing the dimension of a Monte Carlo integration I do on a ...
4
votes
2answers
583 views

How to solve for an Z-Score of a T-Distribution?

I'm looking for the Z-Score for a distribution, where the integrated area sums up to 0.90. Unfortunately I always get an error from Mathematica, ...
17
votes
3answers
3k views

Showing the correlation of two variables using a plot

I have a list of $\{x_i,y_i\}$ pairs and I want to show that $x_i$'s and $y_i$'s have positive correlation. The result of ...