# Questions tagged [scipy]

SciPy is a Python-based ecosystem of open-source software for mathematics, science, and engineering.

340 questions
Filter by
Sorted by
Tagged with
13 views

### Probability RV is min among several iid RVs [duplicate]

This question is inspired by this programming question. Suppose I have 3 RVs which are independent. $$X \sim N(25.5, 2.5)$$ $$Y \sim N(25.2, 3.5)$$ $$Z \sim N(24.9, 1.7)$$ I want to know what is the ...
1 vote
13 views

### Can the scale parameter produce a displacement?

I am doing some stuff with the SciPy's levy_stable distribution. The documentation says: ...
49 views

### KS test for Poisson distribution data

I have a dataset comprising 1000 integers. It represented as follows: ...
499 views

### For Gamma distribution, use MLE or MoM?

For Gamma distribution, is it better to use MLE(maximum likelihood estimation) than MoM(method of moments) to estimate the shape and scale parameters? Also, in python SciPy, does gamma.fit use MLE? I'...
33 views

### Understanding usage of quantile function (norm.ppf), passing p vs 1-p

I was given a question related to the quantile function using scipy.stats.norm.ppf, along with its solution - which I don't understand. I'm changing the question ...
1 vote
35 views

### Paired t-test (one-tail) in Python using scipy.stats.ttest_rel

I am trying to show my hypothesis "H1: values in array a are less than in array b" Therefore, I understand that I need to reject "H0: values in array a are greater than or equal than in ...
22 views

### BIC to test good fitting of data to a model

I want to use the Bayesian Information Criterion in order to measure how well a gaussian and 0 order polynomial fit (using python), the one with the lowest BIC should then be the 'best fit' ? My ...
27 views

### How to esimate the mean and variance of data from a Pareto distribution

I have large sample of data that is approximately from a Pareto distribution with unknown parameters. Unfortunately the distribution is sufficiently heavy tailed that just taking the sample mean is ...
1 vote
42 views

### Constant p-value for all my tests

I am comparing the performance of two AI models across 15 data sets. One model performs heavily better than the other on all the performance metrics. When I perform a one-tailed Wilcoxon signed rank ...
55 views

### Scipy: how to fit only a tail of distribution?

I have a list of floats data, representing tail, sampled from a Generalized Pareto distribution. I want to fit that tail and find shape/scale/loc parameters: ...
59 views

### How to model virus spread over distinct days?

Say I want to model a simple virus spreading over 45 people with a transmission probability of 5%. If I choose my population to be exclusively hospital workers, assuming they work every day, I could ...
1 vote
33 views

...
60 views

### Bayesian Inference: Conceptual question to get evidence

currently I am trying to implement a prototype for the following problem. I have data for machines, which sends me how long they have operated in seconds. Further, they have one sensor, which might ...
27 views

### Confidence interval for sentiment analysis: proportion_confint vs t.interval difference?

I have been working with sentiment analysis for a paper and my advisor wants me to have a confidence interval for everything. Here is my data: ...
75 views

### Scipy.stats.mvn.mvndst function for 3d inputs

I have some code that I'm trying to convert from working with floats to numpy arrays for performance reasons. I have it down to one last function, which is below and requires the ...
158 views

### Python package for making a rank-deficient sparse matrix full rank

I am running a regression with a sparse rank-deficient matrix where many columns are correlated with others. At the moment, I remove all columns with a correlation over 0.8. The matrix has 12k columns ...
167 views

### Wasserstein distance (support; scipy implementation) [closed]

I want to use the Wasserstein distance from scipy.stats.wasserstein_distance to get a measure for the difference between two probability distribution. However, I do not understand how the support ...
60 views

### Why does sklearn's Chi2 test return different results when a feature is present or absent?

I am doing text classifcation and using SciKit Learn's Chi-square test to select features. Reading about the Chi-square test, a word being present in a text should be just as predictive of a class as ...
1 vote
25 views

### Construct a symmetric confidence interval for the acceleration coefficient [closed]

A machine model is tested in the factory to check the acceleration coefficient. The experiment selects n machines of this model and measures the distance traveled by the machine in 38 seconds. It is ...
1 vote
52 views

869 views

### Student's t-test on "high" magnitude numbers

I am trying to calculate whether the difference between the two benchmarks is statically different or not. The input is req/sec of a HTTP Server and I'm using ...
34 views

### Different software (scipy, matlab) giving different p-values (KendallTau)

I'm working on a software codebase transfer between Python (scipy) and Matlab, and am wondering if anyone has any insight as to why I'd be getting different p-values when calculating the p-value for ...
1 vote
215 views

### Why is exponential fit always worse than guess

I have a set of samples that follow an exponential distribution. I want to fit an exponential function to the ECDF. I am using scipy's curve_fit for this, but it ...
46 views

### How do I normalize this feature, I've tried almost everything

I'm trying to normalize this skewed data as part of data preprocessing, but it doesn't normalize no matter which transformation I use to the point it's making me crazy :') . The methods which I've ...
71 views

### Can we change the estimated population mean in Hypothesis Testing?

My goal is to learn hypothesis testing. My understanding is that we do not have the population data. Therefore, we do not know the estimated population mean. So, we guess the population mean. If that ...
1 vote
61 views

### Cannot reproduce chi2 from scipy or sklearn [closed]

Not only don't sklearn and SciPy agree on the value they return for chi2, but they don't agree with an explicit implementation either (at least not always). Why is that? Below is my code for ...
1 vote
165 views

### Interpreting 1-sample t-test results

I have a question around interpretation of results of 1-sample t-test. I am using the test (with SciPy.stats.ttest_1samp function in Python) to check if the existing goal set for a productivity metric ...
156 views

### Which non-parametric two-sample SciPy test to use for my data?

I have three datasets. They contain the angles between a set of vectors (V1) and three other sets of vectors (V2,V3,V5). The datasets should all be continuous and non-parametric, I don't expect a ...
1 vote
89 views

### How is centroid clustering performed with only pair wise distances

I am new to clustering and am a bit confused on how the following code can compute centroid information without the original euclidean vectors. ...