Questions tagged [curve-fitting]

Methods used to fit curves (as in linear or non-linear regression) to data.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Akaike Information Criterion and distribution of residuals

TOY EXAMPLE. Suppose we are interested in the relationship between two quantities, $X$ and $Y$. We set $X = 1, 2, 3$ with certainty and measure $Y$. Our measurements are subject to iid measurement ...
1
vote
0answers
14 views

How to add skew to a normal distribution CDF

I want to curve fit some data to a skewed logistic type distribution. I know that the normal CDF is defined as $$\frac{1}{2} \left[1 + \text{erf}\left( \frac{x}{\sqrt{2}} \right) \right] $$ What I ...
0
votes
0answers
25 views

Unexpected 2D Gaussian fit parameters in python

I am doing some work which requires fitting a Gaussian to a cluster of points which is expected to be distributed normally. I have data which looks like this, you can see the small tightly grouped ...
2
votes
1answer
49 views

Monotonic splines in Python [closed]

I am trying to find a procedure to fit data monotonically in Python. The data won’t be necessarily monotonic. I just would like to achieve a monotonic fit because of theoretical assumptions. I ...
0
votes
0answers
32 views

Parameter Estimation for the SIRD model via Kalman Filter (Part II)

0 Introduction This is my fourth attempt to tune a good prediction SIRD model for the COVID-19 outbreak here in Italy. The model in question is the following: $$\tag{29}\begin{cases} S_{t}&=S_{t-...
1
vote
0answers
15 views

fitting a normal curve to xy coordinates with MLE2 in R

I am trying to fit a normal curve to a series of x,y coordinates found in an R dataframe. My goal is to find the best-fitting normal curve an record the mean and sd. I am trying to replicate the ...
0
votes
0answers
12 views

Interpolation & Curve-Fitting of Hyperbolic Functions

So this may be somewhat odd, but I have a set of points (x,y) that are then fit to various distributions by transforming these distributions to have a linear form. I also have values of adjusted 'x' (...
3
votes
1answer
32 views

log-log plot and straight line fit

I think this is a silly question, but I'm using a very simple data to be fit using a power law equation. If I use a non linear fit (log-log line), I got some parameters that don't correspond if I ...
0
votes
0answers
17 views

Non-linear regression to fit a circle shaped data

My data looks like this: I have tried a neural network model to fit a curve to the data, but my error is too high. I can see that the x-y mappings are not one-to-one, as multiple x values correspond ...
0
votes
0answers
37 views

Need help on how to fit curve with data points?

Sorry my question is vague - I don't really know how to describe the question because I don't know a lot of stats. I have this data below - I am trying to essentially figure out the curve of how ...
0
votes
0answers
11 views

Is there any concepts for degree of freedom on dynamic system specified by differential equations?

We can fit covid19 data with SIR model (here is a good example). My question is how much data is needed to get a unique fit? Is there any concept for degree of freedom on dynamic system specified by ...
1
vote
1answer
72 views

What's the correct regression model for a contagious disease like COVID-19?

I'm examining how COVID-19 has struck different states asymmetrically, with some in the early stages of growth and others in which the number of daily cases is now coming down. Here's what the ...
0
votes
0answers
13 views

Using Python - scipy.optimize to fit a weighted sum of two distributions

I have been working at finding a statistical function that fits a set of empirical data in a project I'm working on. After having tried a number of statistical distributions by using scipy.stats I ...
4
votes
2answers
100 views

Interpreting and troubleshooting nls in R with quadratic plateau model

I am trying to run a quadratic plateau model on some proportion data where values are bound between 0 and 100. I would like some help troubleshooting some errors I have encountered, and correctly ...
2
votes
1answer
133 views

Parameter Estimation for the SIRD model via Kalman Filter (Part I)

0 Introduction This is my third attempt in tuning a good prediction SIRD model for the COVID-19 outbreak. The model in question is the following: $$\tag{12}\begin{cases} S_{t}&=S_{t-1}-\alpha\...
0
votes
1answer
22 views

Determining average duration between input and output (example - CoVID-19 sickness)

Let us assume there are given two sets on data, input and output of a process. For an example, daily number of infected people by CoVID-19 and daily number of resolved cases, be it death or healing. ...
0
votes
0answers
9 views

Getting the error of a mean curve compared to multiple original time series

I have a 5 days of time series of an individual's steps in 15 min intervals. What I have done is fitted a curve to estimate the individual's general day steps profile. So this curve has a span of one ...
2
votes
2answers
360 views

Least Squares Estimation for the SIRD model

I'm experiencing some difficulties in the estimation of the parameters $\alpha, \beta, \gamma$ for the following discrete-time SIRD (Susceptibles, Infected, Recovered, Dead) model with sampling step ...
0
votes
0answers
30 views

Can we fit a piecewise exponential function to coronavirus cases over time?

The naive assumption on number of cases, is it is growing exponentially over time. However, different countries has different policies, for example travel ban or staying at home. So, does it making ...
1
vote
1answer
24 views

Which is more correct to calculate least squares (errors) during nonlinear curve fitting, calculating after transformation or in the original form?

I am studying curve fitting and linear regression. I am supposed to find a and b in the equation $$ P=ae^{bh} $$ so I transformed it to $$ lnP=ln a +bh $$ then $$ Y=c+bX $$ after that I solved it to ...
2
votes
3answers
49 views

Wrong coefficients in a polynomial fit

I am trying to fit data to a fourth-degree polynomial. I tried this in multiple programs (R, Origin Pro, SigmaPlot), all of which give me a polynomial of the form $ 40000 -2000x + 40x^2 -0.3x^3 + 0....
0
votes
0answers
25 views

Regression or Causal Inference in Reinforcement Learning?

In reinforcement learning, we want to find a policy that maximizes the discounted reward. In complex cases in which tabular form is not applicable, we use function approximation, regression. I am ...
0
votes
0answers
6 views

Some Questions on Data Assimilation Methods

I am currently learning about data assimilation methods from this document: https://www.ecmwf.int/sites/default/files/elibrary/2002/16928-data-assimilation-concepts-and-methods.pdf I had a few ...
0
votes
1answer
56 views

Can the Chi-Square Value be Used to Quantitatively Discuss Goodness of Fit for any Data?

To quantitatively discuss the relationship between experimentally measured results and a fitted curve, is obtaining the Chi-Square value for my data relevant? By that I mean if I obtain the Chi-square ...
0
votes
0answers
26 views

Chi Square test gives bad results for good gaussian fit

I have a set of data, that I wanted to fit with the sum of 3 Gaussians. The data can be fit well: However, as can be seen, my p-value is 0.00. Can someone explain me, why? The code, that I used for ...
0
votes
2answers
65 views

Why is this learning curve changing when the training sizes don't start with 1 sample?

I started following the tutorial to create a linear regression model with scikit from here inside jupyter notebook. Then I decided to do a k-cross validation and plot the learning curves. The code I ...
1
vote
0answers
16 views

How to combine/pool the standard error of fitting parameters from multiple fits of the same model?

Let me first explain the context of the problem: I have a time series of the (z-)positions of a particle relative to a surface. For 5 independent subsamples of this time series, I calculate the ...
1
vote
0answers
14 views

Curve Fitting Metrics: Mean Percent Difference

I recently discovered my colleague (not a mathematician) was evaluating their experimental regression analyses by reporting the mean percent difference of each estimated output (from their fitted ...
1
vote
0answers
52 views

Shape constrained curve fitting

This problem concerns fitting a curve to a set of data under a number of constraints. Let $f: \mathbb{R}^+ \to \mathbb{R}$ be a strictly convex function with $f(0) = 0$. Suppose that, as data, one ...
0
votes
0answers
67 views

mean “confidence interval” including where nan data is present

I have a question about getting 'confidence interval' lines for where my data lies. Confidence interval may not be the best definition for it it may be more of a "probability" for where the data is I'...
4
votes
2answers
1k views

Coronavirus growth rate and its possibly spurious resemblance to vapor pressure model

I collected the latest data on the coronavirus from Johns Hopkins University as shown and fitted different curves to this data to model the relationship between the number of confirmed patients $P$ ...
1
vote
0answers
38 views

Find the height of a normal curve to fit a sampling distribution?

I am trying to fit a normal curve to a plot of the results of 1000 simulations regarding a difference in proportions. I created a simulation to randomly assign successes and failures to two groups, in ...
1
vote
1answer
36 views

Multi-variable nonlinear scipy curve_fit

I have been trying to fit my data to a custom equation.which is the following y=(a1/x)+a2*x2+b with curve fit i used curve fit with 1 independant variable it works perfectly but i cannot figure out ...
2
votes
1answer
33 views

Finding parameters values of a function based on data

Supposing that I have a given function that explains some behavior of one determined system. That function, has four parameters on it, which are constants that might change depending on the ...
0
votes
1answer
40 views

Are confidence intervals useful for fitting data?

I recently directed to a very good explanation on the difference between an error band and a confidence intervals, here. My question arose from the context of using error bars/bands or confidence ...
2
votes
0answers
30 views

Is there a non-arbitrary criterion to choose which points to use for interpolation?

Look at the image. I have to interpolate this experimental points with a voigt function to find the position of the center of the peak, I have to choose how many points and which points to use in the ...
1
vote
1answer
43 views

Right way to bin the data-Fitting Voigt profiles to spectroscopy data

I have some measurements of the rate of a physical process versus energy. For each energy I have a number of counts and a measurement time associated to it. However, the step (in energy) at which the ...
0
votes
0answers
14 views

Scaled covariance for error calculation

I am trying to do some fits (linear fits) and I just discovered (I am new to statistics) that most fitting programs have a parameter that can turn on and off the covariance scaling (e.g. in Python ...
1
vote
0answers
26 views

Determining the Total Uncertainty in the Center of a Spectral Line Fit (Physics Experiment)

Currently I am doing a Physics Experiment that requires fitting spectral lines and the fit I chose was a Voigt Profile. The data that I am fitting has multiple peaks so the fit is the superposition of ...
4
votes
1answer
88 views

How to fit a distribution with an “10 and more” category at the bottom?

I want to fit a distribution to some data to sample from it in a subsequent simulation. There are I got a dataset that looks somehwat like this: ...
1
vote
0answers
61 views

Fitting curves in Jupyter Notebook without using the fit function [closed]

For a task for school, I have to write my own fit function by using the least squares method. The problem is I don't know how to do that, specifically I don't know how to minimize my function to ...
1
vote
0answers
21 views

Autocorrelation fitting algorithm

I am currently working on an autocorrelation fitting algorithm, similar to this for a gaussian spectral signal I would like to calculate parameters such as velocity and spectrum width using a finite ...
1
vote
0answers
61 views

Dealing with upper limits when fitting data

Let's assume that I have a set of data composed by two measurements, X and Y (plus respective errors), and I am interested in studying their linear correlation, i.e., finding a linear best-fit Y = a*X ...
1
vote
0answers
52 views

Finding function for histogram to investigate on minimum, maximum and inflection points

To investigate on the statistics of an image, I want to find out how to get all 1.) minima, 2.) maxima and 3.) inflection points for the histogram of a specific image. I know how to extract the ...
2
votes
0answers
18 views

How to fit points to piecewise linear model where all slopes must have the same absolute value?

The current methodology for the genomic data I have involves fitting a spline to multiple points. However, the underlying biology does not support that the fit should be curved at any points. In fact, ...
1
vote
2answers
28 views

Modify fit or function to match certain values

I have following values: x = [0, 12.5, 25, 50, 75, 87.5, 100] y = [0.0, 0.2, 0.31, 0.5, 0.66, 0.76, 1.0] These values represent display values from a device that ...
1
vote
0answers
149 views

Fitting mixture of Gamma variate functions at once (with python)

I am trying to automate the fitting of a signal composed of several Gamma variate functions with some added noise. However, I face some troubles and I do not know how to deal with it. First I do not ...
0
votes
0answers
24 views

Deviation from fit and undersampling of data: can I correlate the two?

I am dealing with data measuring the subjects' response delay after a stimulus is presented on a screen. Most subjects respond within 1 second and the dataset is well fit by a linear equation in this ...
2
votes
0answers
40 views

Bootstrapping across residuals for heteroscedastic data

I have a highly heteroscedastic 2d dataset (x,y) where both x and y cover about 3 orders of magnitude; therefore, although the % error is roughly constant and normally distributed across x, the ...
4
votes
1answer
78 views

Friendly alternative to sums of exponentials?

Physical and biological processes often exhibit (exponential) decay on multiple timescales. A standard approach to modelling such a decay is to fit a sum of of exponentials $$ y(t) = \sum_k a_k \...

1
2 3 4 5
10