Questions on the statistical functions of Mathematica.
24
votes
4answers
2k views
Simultaneously fitting multiple datasets
What is the proposed approach if one wants to simultaneously fit multiple functions to multiple datasets with shared parameters?
As an example consider the following case: We have to measurements of ...
22
votes
1answer
406 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" ...
15
votes
1answer
736 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.) ...
15
votes
1answer
194 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
3answers
411 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
...
14
votes
4answers
879 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 ...
13
votes
5answers
2k 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 ...
13
votes
1answer
370 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 ...
13
votes
3answers
454 views
Measure a DensityHistogram[] pair similarity
I study human vision and more specifically eye-movements.
"If we display 2 symmetrical patterns (20 min one after the other), will our gaze distribution be symmetric is my research question."
The 2 ...
13
votes
2answers
263 views
Interfacing Mathematica with MINE using JLink
In last December's Science David N. Reshef, et al. proposed an interesting method to detect associations in data (Detecting Novel Associations in Large Data Sets, Science 334, 1518, 2011). Contrary to ...
12
votes
2answers
510 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$ ...
11
votes
2answers
767 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 ...
11
votes
1answer
270 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 ...
11
votes
1answer
289 views
Which Distributions can be Compiled using RandomVariate
Recently, Oleksandr kindly showed a list of Mathematica commands that can be compiled.
RandomVariate was part of that list. However, whether this can be compiled depends upon the distribution that is ...
11
votes
1answer
139 views
How does bandwidth selection work for low-variance dimensions with KernelMixtureDistribution?
I am puzzled because this toy example (in Mathematica 8)
...
10
votes
3answers
2k 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 ...
10
votes
2answers
229 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 ...
10
votes
1answer
216 views
Incorrect means of order statistics for the standard normal distribution
Table[Mean[OrderDistribution[{NormalDistribution[], 4}, i]], {i, 1, 4}] // N
(* {-1.02938, -6.47326, 0.297011, 1.02938} *)
Above are the means of order statistics ...
10
votes
1answer
279 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 ...
10
votes
0answers
132 views
10
votes
0answers
565 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 ...
9
votes
3answers
241 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, ...
9
votes
2answers
133 views
9
votes
1answer
168 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 ...
9
votes
1answer
127 views
NExpectation behaves oddly with EmpiricalDistribution
My question concerns the usage of NExpectation and Expectation and why I see the behavior I see in the following example.
First ...
8
votes
3answers
443 views
Forest plot with Mathematica 9
Does anyone have experience with or a package for the creation of forest plots in Mathematica 9?
For instance for subgroup analyses of cox model or meta-analysis (e.g rmeta package in R)?
8
votes
1answer
137 views
CorrelationTest small bug?
Consider two Normally distributed random variables:
x1 = RandomVariate[NormalDistribution[], {1000}];
x2 = RandomVariate[NormalDistribution[], {1000}];
I want to ...
8
votes
2answers
308 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
...
8
votes
2answers
319 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 ...
8
votes
1answer
335 views
Recommended book on random processes to understand new functionality in Mathematica 9?
I am interested in exploring the new functionality on random processes available in Mathematica 9, but I am not familiar with all of the underlying mathematics.
Could you recommend a book that ...
8
votes
1answer
308 views
How to define a new copula distribution family
The function CopulaDistribution can be used with the most well known kernels. I was wondering how I can add a new family of kernels in a way that it works in the ...
8
votes
2answers
399 views
Finding distribution parameters of a gaussian mixture distribution
Short version: how to estimate the parameters of a mixture of multivariate normal distributions (i.e.: Gaussian mixture model)?
Long version.
I am trying to estimate the parameters of a mixture of ...
8
votes
1answer
229 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 ...
7
votes
4answers
626 views
7
votes
2answers
349 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 ...
7
votes
1answer
308 views
Probability and distribution from actual data
Let's say I have some data from a real world system:
...
7
votes
2answers
1k 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
600 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.
7
votes
1answer
165 views
Overlay of pdf using PairedHistogram in Mathematica
With a standard 1D histogram, I can generate a pdf overlay using Show and Plot.
I'd like to do something similar with ...
7
votes
1answer
236 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 ...
7
votes
1answer
216 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 ...
7
votes
1answer
335 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 ...
7
votes
0answers
254 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 ...
6
votes
2answers
1k 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 ...
6
votes
1answer
136 views
Obtaining standardised regression coeffiecients
Regression coefficients are the constant that indicate the rate of change in one variable as a function of change in another. Standardised regression coefficients are the same, but refer to a change ...
6
votes
1answer
165 views
Inconsistency in Histogram's “Probability” Binsize
Context
Let me define a Probability distribution (following the documentation and with some connection to this question)
...
6
votes
1answer
193 views
Fix end point in smooth kernel distribution density
I am using some extreme value fitting method which results in a parametric distribution for values exceeding some threshold, all values $\geq 0$.
For smaller values I'd like to use a smooth kernel ...
6
votes
1answer
425 views
Grain(Particle) Size Distribution (PSD) Analysis with Mathematica
I would like to do an analysis of the grain size distribution of a Monte Carlo Grain Growth simulation I implemented based on the nice example by Rituraj Nandan (see Link).
The result of this ...
6
votes
1answer
206 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 ...
6
votes
1answer
175 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 ...
