# Questions tagged [probability-or-statistics]

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.

1,700 questions
Filter by
Sorted by
Tagged with
91 views

### How to perform brute force method with Knapsack /0-1 money-changing problem, with the following table of potential knapsack items

This is the listing item with 400 as Knapsack size... ...
332 views

### How to get x value where area under curve is some number?

My goal is to get x value where area under the curve (from the x ~ infinity) is about 0.05. But the code which I have tried shows errors. How to correct it? ...
• 141
73 views

### Normalize an L(s, d) function for fixed s

I have the following function L: σ = 9; L[s_, d_] = (1/(σ*Sqrt[2*\[Pi]]))*E^(-(1/2)*((s-(-50-11*Log[d]))/σ)^2) This function L describes basically for some ...
• 291
53 views

### generate statistical table to complete and then review,How can I generate this exact table?

Good morning everyone I want to generate a data table model with intervals (between 5 and 15) following Sturges rule I want to generate a data table model with intervals (between 5 and 15) following ...
• 480
1 vote
84 views

### CDF function from list

How can I get the CDF for a list of values ​​containing the value of a random variable and its probability? I have: ...
1 vote
59 views

### Conditional Probability of first and second letters in a data set of strings

I have a dataset of strings and I would like to take only the first two letters of each string and find the conditional probability P(Second Letter|First Letter) while only looking at the words of the ...
• 13
355 views

### Need help to convert a Matlab script into a Mathematica script?

I would like to convert a small script but a little technical in Mathematica language. Here is the Matlab script : ...
76 views

### (rolling) n-weekly average

I have the data of the SPX index weekly ...
• 1,055
34 views

### Evaluating $T(x,y) = ((K_h*K_g - K_g)*(K_h*K_g - K_g))(x-y)$?

Define $K_h$ as$$K_h(x) = \dfrac{1}{h}K\bigg(\dfrac{x}{h}\bigg),$$ where $K$ is the Gaussian function$$K(x) = \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^2}.$$ Define the function $T(x,y)$ by T(x,y) = ...
• 183
65 views

### How to find sum of squares of data from a multivariate (Dirichlet) distribution? [closed]

Let $X = Dirichlet(1,1,1)$ be a tri-variate random variable with Dirichlet distribution with parameters all equal to 1. I need to find what $X_1^2+X_2^2+X_3^2$ will be. I did ...
34 views

### Visualize the optimal point for distribution with three parameters

I want to visualize to any distribution with two or three parameter ...
• 29
1 vote
112 views

### Exponential Decay fit and printed parameters with integer data [closed]

Problem: I'm trying to plot an exponential decay curve on a set of integer data, and print the various parameters and their uncertainties on the plot itself. Having adapted code from another question, ...
• 467
69 views

### Sampling inhomogeneous spatial point processes

I am looking to generate a point process (random set of points) in a disk of radius $R$, but where the intensity measure decays, for $r$ the distance from the origin of the disk, as $\exp(-r^2/2)$. Is ...
• 1,505
77 views

### Getting pdf of X^2

My goal is to get pdf of x^2 with x follows N(0,1). I have tried as below but the result(at Out[41] is not what I expected(Sqrt[y] term supposed to be at denominator). How to correct? (I have Copied ...
• 141
1 vote
87 views

### How does NonlinearModelFit work? [closed]

Suppose I have a model $f (x)$ with some free parameters $a, b$ and I want to fit my model to a data set called Dx. How does NonlinearModelFit find the value of ...
• 585
117 views

### Mean of TransformedDistribution returns wrong result

I want to compute the mean of this transformed distribution $10^{(25+5x+y)/5}$, where $x$ and $y$ are independent normal random variables. Here is my code ...
115 views

### Understanding the Correlation[] function in Mathematica

I have this data for four quantities measured in different temperatures: ...
• 1,252
45 views

### How to compute an indefinite integral for a general parameter choice?

I am trying to compute the integral: Integrate[E^(a*InverseCDF[NormalDistribution[0, 1], (1 - x)]), x] for a >= 0. The ...
141 views

...
• 115
1 vote
84 views

### TransformedDistribution not returning a function

I'm trying to use TransformedDistribution to find the distribution of a function of two variables that have Normal distributions. The function is $h(x, y)=x^2+y^2$. I tried to do this two ways, first ...
• 37
1 vote
81 views

### Probability of a point randomly chosen in a circle is nearest to the center [closed]

I've been having some trouble thinking about this problem for a couple days, but everything I've done has been useless, can you guys help me? Inside of a circle of radius A>0, N points are chosen ...
• 19
28 views

### LogitModelFit for predicting Categorical Variable

I was wondering how can I use LogitModelFit to predict the probability of a categorical variable based on non-categorially variables ?
• 41
42 views

### How to use one-way ANOVA for three groups?

I want to reproduce the Example illustrated here using Mathematica 12.0. In this example one-way analysis is applied to the following three groups of values: ...
41 views

### How to find the expected value of a parametric function?

Suppose $a \ge 0$ is a parameter and $X_1$ is an uniform random variable in $[1,4]$ and $X_2$ is an uniform random variable in $[1/2,1]$. How to find the expected value of $\max\{5-X_1a, 3-X_2a,0\}$?
• 147
1 vote
42 views

### Binned Log-Maximum Likelihood

I have a dataset describing, say, radioactive decays. I studied the binned maximum likelihood method for estimating the mean lifetime. Since I am new to Mathematica, I am trying to understand how to ...
• 11
190 views

### Finding Chi^2 of a Non-Linear Fit Model

Question: I have some data, with a y=Ae^(-kt) model applied (It's a radioactive decay), thanks to answers on another question, the model is applied and returns the ...
• 467
146 views

### Chen weibull distribution

I write the density function of cw distribution and add data to calculate parameters maximum likelihood but the results of Mathematica no like the research ...
• 29
84 views

### Why does FindDistributionParameters[] fail to converge for this distribution? [closed]

During testing my code for calculate parameters The following exception is thrown: ...
• 29
66 views

### 'FindFit' ignoring certain data points to optimise r^2 value

As shown in the code below, ...
60 views

### Confidence interval for variance in fit

When using (Non)LinearModelFit you can get estimates for all parameters and for the variance of the fit and confidence intervals for parameters, but what about a confidence interval for the variance? <...
1 vote
49 views

### Values corresponding to SmoothDensityHistogram

I am looking for extracting the values associated with SmoothDensityHistogram. For example in ...
• 317
29 views

### Assessing your own classifier function with ClassifierMeasurements or NetMeasurements

The functions ClassifierMeasurements and NetMeasurements expect objects that are created through ...
• 31
223 views

### Why is the conditional probability not working for CategoricalDistribution?

Bug introduced in 12.1 and fixed in 12.3 Consider the following simple example for demonstration: ...
• 8,105
1 vote
45 views

### Help with NIntegrate settings to evaluate integral [closed]

I am trying to evaluate this integral: \begin{align*} \alpha_{2}=\int_{-\infty}^{1.645}\left[1-\Phi\left(\frac{\sqrt{25}}{\sqrt{15}} 1.645-\frac{\sqrt{10}}{\sqrt{15}} z_{1}\right)\right] \phi\left(z_{...
• 113
220 views

### Entropy of a distribution

I need to calculate the entropy of a distribution from raw data. I found two approaches here and here. But it seems they don't work for my case. My data is: ...
1 vote
99 views

### Moving average over time on data entering stochastically

The examples for using MovingAverage mostly refer to data evenly spaced in time,such as stock values. In typical physics data, events arrive random in time (e.g. radio active decay events, but also ...
• 61
1 vote
90 views

### Calculation of an integral which involves distribution of data

I have some data as: ...
240 views

### Applying an exponential decay fit with uncertainties

I have some data from a radioactive decay experiment that I'm trying to fit an exponential decay curve on that will take account of the uncertainties on the data, and then ideally return the data for ...
• 467
65 views

### Skewness and central moment

I have distribution which I want to calculate the third order moment function of my distribution. I got confused what is different between Moment third order and ...
1 vote
40 views

### Create CDF from a custom function

I have a complex function as follows (sorry for ugly script due to many parameters in the code!) which gives CDF of some data. I wonder whether there's any way to write it in CDF form in Mathematica, ...
• 11
153 views

...
• 155
68 views

### How to go from a Pareto Distribution in Scipy to a Pareto Distribution in Mathematica?

Assume that I have fitted a Pareto distribution via Scipy and have gotten the following parameters: ...
81 views

### 3D scatter plot combined with user-defined adjustable planes [closed]

I am trying to find some service/application/web-app or otherwise that allows for the following functionality: Plot points in 3d space. Insert plane in 3d space wherever I like. As in it must not be ...
54 views

### outcomes and payoff in probability games [closed]

I am reading probability from AI point of view from book Artificial Intellegence A Modern approach by Russel and Norving. Below is text snippet from chapter 13. One argument for the axioms of ...
77 views

### Evaluation points following a bivariate Gaussian distribution [closed]

I have a function of two variables, say $f(a, b)$, which I want to evaluate (and later average) in the neighborhood of $a=0$ and $b=0$, with density of points around $(a,\,b)$ following a Gaussian ...
• 973
83 views

### How to plot Log(P(x)) in a histogram?

I have been using SmoothHistogram to plot the probability density function $P(x)$ of some experimental data. On the y-axis, I would like to have $\log(P(x))$ ...
• 115
125 views

### Speeding up code doing random sampling

I have a particular probability distribution (that is a function of a parameter $\phi$), that I would like to sample from and then do a listplot for that function. Here is the code that I came up with:...
59 views

### Taylor expansion of expected value of a function with multiple random variables

The expected value of a function of multiple random variables can be approximated by a Taylor expansion. How this can be done in MMA is described in other posts (Link1, Link2). Let's assume we have a ...
89 views

### Problem with parameters from fitting

I am trying to fit the following data (called TflogqIND): ...
• 1,531
1 vote
I'm new to Mathematica and confused about how random variables work. Say I have a standard normal random variable $X\sim \mathcal N(0,1)$ and set $Y := 2X$. Then $\operatorname{Cov}(X,Y) = 2$. Now if ...