All Questions
Tagged with statistics scipy
883
questions
0
votes
0
answers
35
views
How to create rv_histogram from known probability density function values
Let's say there is a distribution, and all what is known about the distribution is the value of its probability density function in a small range(e.g. from 0.0 to 0.001).
Then, I want to use ...
1
vote
1
answer
41
views
P-Value not matching test statistic in Kolmogorov–Smirnov test (stats.kstest)
I am trying to learn how to use the Kolmogorov–Smirnov test in scipy (stats.kstest). For a simple problem like the example in the documentation, the test statistic for the one sample test seems to be ...
0
votes
1
answer
23
views
Z-Score as measurement of diverging values
I've been trying to use the z-score to filter out odd values in python. For the calculation I've used the version scipy is offering, vs calculating it myself using numpy and the mean and std functions....
2
votes
0
answers
45
views
How to implement a mixture of gamma distributions in Python without Bayes'?
I am trying to create examples to compare and contrast Bayesian MCMC (e.g. HMC) with non-Bayesian equivalents. One of the cases I am finding difficult is creating a mixture of gamma distributions.
I ...
1
vote
2
answers
48
views
Subclassing scipy.stats.rv_continuous for truncated distribution
I would like to create a random variable from a truncated complementary error function. For this I want to subclass scipy.stats.rv_continuous. I have checked Subclassing scipy's continuous ...
0
votes
1
answer
62
views
TypeError: ufunc 'isnan' not supported for the input types - while performing Mann-Whitney U test
I have two data frames,primary_tumor_df and healthy_tissue_df to perform the Mann-Whitney U test. I have also removed nan values from both the data frames.
Structure of primary_tumor_df.
Structure of ...
0
votes
0
answers
37
views
statsmodels qqplot doesn't match when using fit=True and scipy.stats.dist.fit
I was researching how quantile-quantile plots work and came across the following inconsistency:
I was trying to compare quantiles from uniformerly distributed sample against normal distribution ...
0
votes
0
answers
30
views
Adding Boundaries to Scipy.Stats KDE Plots
I am plotting (x,y) data on a coordinate plane using a gaussian kde from the scipy stats library. While I want the kde plot to be able to extrapolate and assign a probability to areas within the map, ...
0
votes
1
answer
73
views
Mismatching Python and MATLAB
I have starting to fit lognormal distribution to my data, but I was a bit sceptical about the results I got. So, I double checked it with MATLAB and found completely different results. The fitting ...
0
votes
0
answers
117
views
problem with inputs for estimating earth mover distance with emd from python ot package
when implementing the emd and emd2 functions from the ot package here I'm a little confused on how to input a,b to be consistent with M, the cost matrix.
without the a,b inputs, things work as I ...
1
vote
1
answer
46
views
Scipy Differential Evolution - Extraction of percentage of invalid population energies (via callback?)
I am currently working on an optimization problem and would like to extract the information of the fraction of invalid population energies from the package during each iteration step of the ...
2
votes
1
answer
68
views
Computing multivariate normal integral over box region in SciPy
I am trying to evaluate the multivariate normal distribution to get the probability that 1 < z1 < 2.178 and 2.178 < z2 < inf. The mean of the distribution is zero, all variances are 1, and ...
0
votes
0
answers
90
views
How can I calculate percentile for every single data inside an xarray dataset
I have a dataset of one variable with the dimension of time, lat, Lon. The dataset looks like the following and it has several grids where there is NaN values:
<xarray.Dataset>
Dimensions: (...
1
vote
0
answers
97
views
Best way to calculate percentile for every single value from actual and very large sized daily data (time 36500 X lon 3600 X lat 1500)
I have NETCDF files consisting of actual measurements of different variables at the daily scale and in a 3D format (time, lat, lon). The data size is huge, it is for 150 years at 0.1 degree spatial ...
0
votes
2
answers
197
views
Combine rows and columns to create a 2x2 table for Fisher's exact test
I need to perform a test of independence on the following crosstab ct using python:
Since there are some values less than 5, I cannot perform the chi-square test of independence. Instead, I need to ...