Questions on the statistical functions of Mathematica.
3
votes
1answer
144 views
Getting slightly different results in fitting a logit model in R and Mathematica
I'm fitting some data to a Logit model in both Mathematica and R and I'm getting slightly different results.
R code:
...
0
votes
1answer
157 views
Trying to plot this probability
Can anyone help me plot this?
log P(X >= x) = alpha logx
x=0.001 + k(0.001)
k= 0, ..., 100
I can't figure out the coding for this.. I've been trying this for a while, and can't seem to figure it ...
7
votes
1answer
334 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 ...
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)
...
9
votes
2answers
133 views
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 ...
3
votes
0answers
154 views
Mathematica Complains about Non Symmetric Covariance matrix, when it's not the case
I was doing some fitting with Mathematica7 using NonlinearModelFit. It's quite long the program to do the fit and that's why I am not displaying here ...
It goes ok, and I can get the fit parameters ...
4
votes
3answers
992 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 ...
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 ...
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" ...
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$ ...
4
votes
2answers
131 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
189 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
295 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
385 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?
8
votes
1answer
228 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 ...
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 ...
4
votes
2answers
246 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
363 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 ...
3
votes
1answer
99 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 ...
7
votes
1answer
305 views
Probability and distribution from actual data
Let's say I have some data from a real world system:
...
1
vote
2answers
174 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
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
...
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 ...
3
votes
2answers
130 views
How to change type order in PearsonDistribution?
I need to estimate a Pearson distribution from a batch of tables tab:
...
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 ...
10
votes
0answers
563 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 ...
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)
...
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 ...
1
vote
2answers
144 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
180 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 ...
1
vote
0answers
215 views
How to apply ANOVA test to K-Means clustering
I'm generally looking for how to apply ANOVA test to neural networks.I'm particularly interested in ANOVA tests for
clustering
function estimation
below is the code taken from K-means clustering ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
11
votes
2answers
765 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
306 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
...
0
votes
1answer
219 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 ...
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 ...
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 ...
2
votes
2answers
221 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:
...
5
votes
3answers
279 views
3
votes
2answers
342 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?
4
votes
2answers
388 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, ...
5
votes
4answers
322 views
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.) ...
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 ...



