Questions about systematic data collection and organization, or the application of probability theory to model the inherent patterns and properties of sampled data, underlying data distribution(s) or random processes.

learn more… | top users | synonyms (3)

1
vote
1answer
23 views

Do Any of the filter functions perform a LOESS or LOWESS filter?

From the Data Transforms and Smoothing guide there is a link to the Linear and Nonlinear Filters guide. Do any of these filter functions perform a LOESS or LOWESS filter on set of paired data? ...
1
vote
1answer
77 views

How to improve speed of the following code

The following code do what I needed, but it takes too long ...
0
votes
0answers
34 views

Error propagation code [on hold]

I have a code for error propagation :- ...
9
votes
1answer
92 views

How to do Independent Component Analysis?

The new experimental function in 10.3.1 DimensionReduce[], has the following three options for Method: ...
5
votes
1answer
90 views

Statistical measures of a function of a 2D matrix of random variables

Im new to Mathematica, and I have been searching online without success an answer to what should be an easy question. I want to define a function $f$ on, say, $n$ independent random variables and ...
6
votes
5answers
193 views

How to generate two group of $n$ random numbers in $U(0,1)$ such that sum of these two groups equal? [on hold]

I want to have two groups of $n$ random numbers $u_i$ and $v_i$ in $U(0,1)$, such that $\sum u_i = \sum v_i$ What I tried is: I can firstly get $u_i$ by ...
5
votes
2answers
103 views

Linear fit with conditional noise distribution

I need to fit a linear model of the form $y_i = a · x_i + b + e_i$. The $e_i$ are independent noise from a distribution that depends on $x$ as well as on global parameters of the data; however, the ...
5
votes
4answers
439 views

Entropy[…] doesn't calculate the entropy of a probability distribution? What does it do?

I know the definition of entropy of a probability distribution: $$H = - \sum_i p_i \log p_i $$ So for example, in a Bernoulli distribution with $p = 0.2$, $1-p=0.8$, the entropy is $0.5$. However, ...
1
vote
1answer
53 views

Conditional probability syntax [closed]

What syntax do I use to compute this in Mathematica? Game of Yahtzee: 1. Suppose you get three 5’s on the first roll. What is the probability of rolling the other two dice and completing the Yahtzee ...
1
vote
1answer
39 views

Generate a simulated covariance matrix

I am working on a problem where one of the input variables is the level of covariance between the entries in a particular matrix. To simulate this problem in Mathematica, I will need to feed my code ...
0
votes
2answers
81 views

Weighted arithmetic mean [closed]

How can I calculate the mean value of my graphs computed below ...
4
votes
0answers
45 views

Gaps in CDF produced from HistogramDistribution

I have about 200 real numbers spread over the range 0-400. I use HistogramDistribution to bin them and PDF to create the ...
6
votes
1answer
203 views

Using Mathematica to derive the PDF of A Cos(x) [closed]

Let Y = cos(X), where X is uniformly distributed in the interval (0, 2 pi]. Find the pdf of Y. I know the answer but want to verify using Mathematica.
1
vote
1answer
75 views

Implementation of Kullback–Leibler divergence in Mathematica: dealing with negative infinity?

I'm trying to implement a function to calculate Kullback-Liebler Divergence but I am running into a problem with complex infinities in my intermediate result. Here is how I have implemented it thus ...
3
votes
3answers
84 views

Working with $X^2$, where $X$ has the uniform distribution in $[-b,b]$

Consider $b>0$ and let $X \sim U[-b,b]$ (the continuous uniform distribution in $[-b,b]$ ). I want to do two computations in Mathematica. First is to compute the density function of $X^2$, which I ...
6
votes
4answers
243 views

Average dataset with many repetitions?

I have a dataset where each item is of the form: <|"p1" -> x1, "p2" -> x2, "r1" -> y1, "r2" -> y2|> The interpretation is this: ...
2
votes
1answer
109 views

Random Variate generating strange results when using ProbabilityDistribution

I have created a probability distribution that follows a general normal distribution, given by: $$ \frac{b *e^{-\left(\frac{\sqrt{(x-u )^2}}{a }\right)^{b }}}{2 a \Gamma \left(\frac{1}{b }\right)} ...
3
votes
2answers
92 views

How to form binary matrix with constants and given probability?

I want to create a binary matrix of 6x3 in which six elements (m13,m23, m33, m42, m52, m61) are constant and assigned '0' value; whereas for other twelve elements (m11, m12, m21, m22, m31,m32, m41, ...
1
vote
1answer
43 views

Mean of a half-Cauchy distribution

I am trying to calculate the mean (if it exists) of a half-Cauchy distribution. I know that the mean of the a Cauchy is undefined, but I was wondering whether the same is true of a half-Cauchy? (A ...
1
vote
0answers
28 views

Inverted empirical CDF with averaging including BoxWhiskerChart

I'm new to Mathematica and started using it because of interest in statistics. So I've started reading books about statistics and found the problem, that the inverted empirical CDF with averaging ...
5
votes
0answers
92 views

Multivariate Adaptive Regression Splines (MARS) - Mathematica implementation?

Does anybody have or know of a Mathematica implementation of the Multivariate Adaptive Regression Splines (MARS) algorithm?
1
vote
0answers
101 views

Fitting data to an Normal Inverse Gaussian distribution

I am using data which I suspect is distributed according to the Normal Inverse Gaussian distribution (NIG). The literature says that the 4 parameters of the NIG can be estimated from the sample mean, ...
0
votes
2answers
96 views

How to map the second highest value in each row of a matrix

I have a matrix with three or more columns called mat. I would like to map the second highest value in each row of mat into its ...
1
vote
1answer
96 views

Plotting probabilistic histogram on a specific range on log scale

I'm having a problem getting a combined effect - I have a list of values for which I'd like to plot a histogram. As a minimal example: ...
8
votes
3answers
286 views

How to evaluate if a list obeys the Normal distribution?

I am processing a data when I encountered this problem. I use the way of plotting the "normal probability plot" to show the result The list I have is: ...
3
votes
2answers
61 views

Estimating Bernoulli success rate (and confidence interval) from success count in sample?

I have a sample of 0s and 1s from a Bernoulli distribution with unknown success rate $p$. I know the function ...
0
votes
1answer
47 views
0
votes
0answers
41 views

Extract coefficients from sum

I would like to extract coefficients of indexed variables from a large sum. The following is an example motivated by linear regression to illustrate the problem. Consider the (unnormalised) log ...
1
vote
0answers
73 views

Factor Analysis

How can I do Factor Analysis with Mathematica? This is my best attempt so far: ...
1
vote
0answers
56 views

How can I access the Criterion function of KI method in `FindThreshold` for a dataset?

I want to find a threshold for some data set, using Kittler-Illingworth minimum error thresholding method (KI method). To do so, I use the Mathematica built-in function ...
1
vote
1answer
60 views

Boundary parameter in Beta Distribution

I use EasyFit to find the probability distribution of my data. It turns out the data follows BetaDistribution with 0.54022,0.70601 shape parameters and 1.33,6.83 continuous boundary parameters I am ...
3
votes
1answer
29 views

Define behavior of an expectation function wrt derivative

I wanted to calculate the expressions for Ursell functions $$u_n(\sigma_1,\ldots,\sigma_n) = \frac{\partial}{\partial a_1}\cdots \frac{\partial}{\partial a_n}\log E(\exp\sum ...
2
votes
1answer
156 views

Adding two random variables (probability distributions)

Let's consider two balanced dice. I am modelling each of them using ...
3
votes
2answers
147 views

Generate a set of pairs

I am dealing with the following function fun[x_, z_] := a (1 - z^2) cos[x]^2 - (b z^2 + z - c). My task is to generate the set of random pairs {x, z} such that ...
3
votes
3answers
114 views

the number of values problem

I have the following problem. I have to generate 100 random values and make a list. From this list I will randomly select 60 values and calculate MeanCI <- ...
0
votes
0answers
36 views

Non-existent PDF for combined MixtureDistribution and TransformedDistribution?

I am trying to mix two discrete distributions, one of them shifted by an integer amount by means of TransformedDistribution. When I then try to access the mix, it responds to CDF but not PDF. This ...
1
vote
3answers
102 views

How do I tell if two sets of dots are in some way similar?

I have two sets of dots (x,y coordinates) and I'd like to figure out if there's a way to find out if the second set of dots is (more or less) "close" to the first one. I may plot these two sets in ...
14
votes
4answers
2k views

Random letters: What is the chance that real words are generated?

Suppose that we are just typing random letters with our keyboards and we include space bar. We don't distinguish between capital and lowercase letters. If we do this for a long time, how many of the ...
2
votes
2answers
239 views

Generate a random PDF

How can I generate a random probability density function p(x) in the domain [0,1]? Is there a single mathematica function to do so?
3
votes
1answer
101 views

Estimated Variance in LinearModelFit

Suppose that lmModel is a linear model which is fit using LinearModelFit. How come ...
8
votes
7answers
967 views

How to model rolling a pair of dice 100 times (Monte Carlo)

Like the title says, I'm having trouble trying to write out a function that will find the probability of finding the sum of a pair of dice 100 times to find the probability of each sum of 2,3,4,5...up ...
4
votes
1answer
115 views

Finding Distribution based on quantile data

I am trying to determine an approximate distribution based on quantile data. I have the following information regarding Profit/Loss from an investing strategy backtest, and I want to use the data to ...
2
votes
0answers
60 views

Is there a way to make a set of all real numbers within a range? [closed]

Is there a way to create a set of all real numbers within a range? For example, the range between 1300 and 1500, including 1500 in normal distribution. Thank you very much. My problem exactly: $A$ ...
4
votes
2answers
125 views

FindFit and NMinimize to fit a parametric model (minimize the distance of two curves)

I am trying to find a fit to the cumulative distribution of a set of points using FindFit or NMinimize. In particular, I would like to find the parameters of the cdf of the Beta Distribution that ...
1
vote
0answers
55 views

FindFit with a sophisticated function (2), with corrected question and code

I am trying to find a fit to the distribution function (empiricial data) in terms of a function which is itself an integral of a product of two simplier functions. In particular, I observe T(x) (this ...
1
vote
1answer
84 views

FindFit algorithm?

Does anyone know how to program a mathematica algorithm that does the same thing that FindFit does? Is there documentation of it somewhere? I assume it is a least ...
0
votes
0answers
58 views

Using the results of FindPeak in FindFit

Using FindPeak on some datapoints, I have found the positions and values of likely Gaussian peaks which form the data. The format is ...
0
votes
1answer
103 views

How to fit multiple Gaussian peaks to data [duplicate]

How would I fit this data with Gaussian Peaks? I have tried various codes but none have even worked. Note: If I do Log[data], the peaks are more visible (I have tried the method from here but it got ...
1
vote
1answer
108 views

Fitting multiple peaks

I am using the code found here to fit multiple peaks of a large dataset which I don't know anything about. This was the only code I could find on the internet to do such a thing. So this is my attempt ...
0
votes
0answers
20 views

Remove background from multipeak data [duplicate]

Let's say I have a a very large list of data in the format {{n,f[n]}} so something like {{1,600},{2,700},{3,1100}...} and if this data is plotted, then it will look like a sum of Gaussian functions+a ...