<p>It is difficult to say, there isn't a description in the paper as to how they arrive at those numbers. Given that the equivalent widths of the lines have signal to noise levels that mean they are only greater than zero at significance levels of 2-3, then it isn't clear these are meaningful numbers at all.</p>
<p>However, here is how it might have been done.</p>
<p>You fit a continuum model to the spectrum, get a minimum chi-squared <span class="math-container">$\chi^2_1$</span> (or maximum [log] likelihood value); you then fit a continuum plus absorption line model and get a new, lower value, of chi-squared <span class="math-container">$\chi^2_2$</span> (or higher value of max log likelihood)</p>
<p>You then get the difference in chi-squared <span class="math-container">$\Delta \chi^2 = \chi^2_1 - \chi^2_2$</span> (or form the likelihood ratio) of the two models, which should be distributed as chi-squared with the number of degrees of freedom being equal to the number of new parameters in the more advanced model (i.e. 3 for a line centre, width and depth). You then check a chi-squared table for the corresponding p-value and significance.</p>
<p>In other words, if <span class="math-container">$\Delta \chi^2 = 6.25$</span>, that corresponds to p=0.1, or if <span class="math-container">$\Delta \chi^2 = 11.35$</span> for p=0.01 etc.</p>
<p>In your comments you say:</p>
<blockquote>
<p>First i use powerlaw to fit the continue get reduced chi-square1 = 1.00277 / dof=179. Then i fit with powerlaw+gauss, the reduce chi-square2 = 0.88091 / dof=176. The Δχ2 = 24.455. Is that right?</p>
</blockquote>
<p>Yes. A chisquared test for 3 d.o.f. yields p=0.00002012</p>
<p>To convert to a number of Gaussian sigma, it is the stuff of standard statistics that
<span class="math-container">$$ n\sigma = \sqrt{2} {\rm erf}^{-1} (1 - p)$$</span>
which in the case above suggests a significance of <span class="math-container">$4.26\sigma$</span>.</p>

CC BY-SA 4.0
2020-07-10T08:45:44.660Z
Thank you Rob. I fit with your method. First i use powerlaw to fit the continue get reduced chi-square1 = 1.00277 / dof=179. Then i fit with powerlaw+gauss, the reduce chi-square2 = 0.88091 / dof=176. The Δχ2 = 24.455. Is that right? Then i want to ask, if the reduced chi-square1 < 1 and reduce chi-square2 > 1, how can i calculate, get the absolute value of the different? And what is the relationship of p-value and traditional sigma significance level, i.e. 3*sigma=what p-value?
Chen
CC BY-SA 4.0
2020-07-10T10:49:52.810Z
@chen The method is described in my answer. The relationship between p-values and sigma are in standard statistics tables. 3 sigma is $p<0.003$.
ProfRob
CC BY-SA 4.0
2020-07-10T11:52:10.580Z
@Chen I just realised you were asking me what happens if the new reduced chi-squared is worse than the old one. Well I think that is just about possible, but in any case it indicates that your fit has not improved so there is no significant line.
ProfRob
CC BY-SA 4.0
2020-07-10T14:26:03.937Z
What is erf in your formula? Since the best reduced chi-square is 1, so maybe above 1 and below 1 should have equal fitting result. So in your formula Δχ2=χ21−χ22 , then if one chi-square is above 1 and another one below 1, how to calculate them? The same formula as the both are in the same side of 1?
Chen
CC BY-SA 4.0
2020-07-10T15:00:51.787Z
@Chen erf is the "error function". The best reduced chi-squared is not 1. Adding more parameters to your model will always make chi-squared smaller and will usually (but not always) make the reduced chi-squared smaller. Stop thinking about reduced chi-squared since it is irrelevant to your question (or my answer).
ProfRob
CC BY-SA 4.0
2020-07-11T15:11:52.647Z
Now i see the relationship of p-value and 3*sigma. Thank you so much for your help.
Chen
CC BY-SA 4.0
2020-07-09T13:57:27.813Z
2020-07-10T11:07:39.487Z
2020-07-10T11:07:39.487Z
ProfRob
<p>In some papers, they fit a line profile with gaussian model. For example, in
<a href="https://ui.adsabs.harvard.edu/abs/2004ApJ...605..793F/abstract" rel="nofollow noreferrer">this paper</a>, fig 1 draw three gauss line profile, O VII, O VIII, and Ne IX.
But the data seems noisy and the gaussian height (from bottom to the top of the gauss line, especially O VIII, and Ne IX) do not seems above 3*(the height of 1-sigma errorbar) of the residual data. But in the text they say (on the left bottom of page 3): &quot;The centroid wavelengths of three lines are consistent with O VII, O VIII, and Ne IX at zero redshift,respectively. Those lines are statistically significant at the 6.5, 3.1, and 4.5 sigma levels.&quot;. So i'm puzzled with the calculation algorithom of the significance. In my memory that the sigma=sqrt(variance of the residual data) and the height of gauss Intensity=exp(a*(x-b)/c^2), the significance = a/sigma. Then any wrong with my calculation?</p>

CC BY-SA 4.0
2020-07-09T12:04:27.850Z
Can you edit your question to point to a specific example in a paper?  That would make it easier to see how they are calculating significance. My guess is that the calculation is based on all of the points that make up the line - so they may not be measuring the *height* of the line at the 3 sigma level, but rather the *presence* of the line overall - a bunch of consecutive points deviating from the overall continuum level, at the right wavelength for a known line, can be significant even if each point alone might not be.
Eric Jensen
CC BY-SA 4.0
2020-07-09T13:26:43.970Z
At it's most basic level, if you have 4 individual (indepependent) bins of data that roughly define your Gaussian shape, each of which are 2 standard deviations above the continuum, then the whol eline would have a significance of 4 sigma ($2 \times \sqrt{4}$). Of course it isn't quite that simple, but that is the root of your problem/misunderstanding.
ProfRob
CC BY-SA 4.0
2020-07-09T13:35:43.670Z
Thank you. I reedit my question and add a link to the paper. Can you see out how they calculate the significance of these gauss line profile?
Chen
<astrophysics><spectroscopy><spectra>
How to calculate the statistically significant level for a guassian line profile?
Chen
# How to calculate the statistically significant level for a guassian line profile?

(Asked by: username_0 on 2020-07-09)

In some papers, they fit a line profile with gaussian model. For example, in
[this paper](https://ui.adsabs.harvard.edu/abs/2004ApJ...605..793F/abstract), fig 1 draw three gauss line profile, O VII, O VIII, and Ne IX.
But the data seems noisy and the gaussian height (from bottom to the top of the gauss line, especially O VIII, and Ne IX) do not seems above 3\*(the height of 1-sigma errorbar) of the residual data. But in the text they say (on the left bottom of page 3): "The centroid wavelengths of three lines are consistent with O VII, O VIII, and Ne IX at zero redshift,respectively. Those lines are statistically significant at the 6.5, 3.1, and 4.5 sigma levels.". So i'm puzzled with the calculation algorithom of the significance. In my memory that the sigma=sqrt(variance of the residual data) and the height of gauss Intensity=exp(a\*(x-b)/c^2), the significance = a/sigma. Then any wrong with my calculation?

**Tags:** astrophysics, spectroscopy, spectra
> **Comments:**
> **username_1**: Can you edit your question to point to a specific example in a paper?  That would make it easier to see how they are calculating significance. My guess is that the calculation is based on all of the points that make up the line - so they may not be measuring the *height* of the line at the 3 sigma level, but rather the *presence* of the line overall - a bunch of consecutive points deviating from the overall continuum level, at the right wavelength for a known line, can be significant even if each point alone might not be.  
> **username_2**: At it's most basic level, if you have 4 individual (indepependent) bins of data that roughly define your Gaussian shape, each of which are 2 standard deviations above the continuum, then the whol eline would have a significance of 4 sigma ($2 \times \sqrt{4}$). Of course it isn't quite that simple, but that is the root of your problem/misunderstanding.  
> **username_0**: Thank you. I reedit my question and add a link to the paper. Can you see out how they calculate the significance of these gauss line profile?  

---

## 1 answers

### Answer by username_2 on 2020-07-09. Score: 2 | Accepted answer

It is difficult to say, there isn't a description in the paper as to how they arrive at those numbers. Given that the equivalent widths of the lines have signal to noise levels that mean they are only greater than zero at significance levels of 2-3, then it isn't clear these are meaningful numbers at all.

However, here is how it might have been done.

You fit a continuum model to the spectrum, get a minimum chi-squared $\chi^2\_1$ (or maximum [log] likelihood value); you then fit a continuum plus absorption line model and get a new, lower value, of chi-squared $\chi^2\_2$ (or higher value of max log likelihood)

You then get the difference in chi-squared $\Delta \chi^2 = \chi^2\_1 - \chi^2\_2$ (or form the likelihood ratio) of the two models, which should be distributed as chi-squared with the number of degrees of freedom being equal to the number of new parameters in the more advanced model (i.e. 3 for a line centre, width and depth). You then check a chi-squared table for the corresponding p-value and significance.

In other words, if $\Delta \chi^2 = 6.25$, that corresponds to p=0.1, or if $\Delta \chi^2 = 11.35$ for p=0.01 etc.

In your comments you say:

> First i use powerlaw to fit the continue get reduced chi-square1 = 1.00277 / dof=179. Then i fit with powerlaw+gauss, the reduce chi-square2 = 0.88091 / dof=176. The Δχ2 = 24.455. Is that right?

Yes. A chisquared test for 3 d.o.f. yields p=0.00002012

To convert to a number of Gaussian sigma, it is the stuff of standard statistics that
$$ n\sigma = \sqrt{2} {\rm erf}^{-1} (1 - p)$$
which in the case above suggests a significance of $4.26\sigma$.

> **Comments:**
> **username_0**: Thank you Rob. I fit with your method. First i use powerlaw to fit the continue get reduced chi-square1 = 1.00277 / dof=179. Then i fit with powerlaw+gauss, the reduce chi-square2 = 0.88091 / dof=176. The Δχ2 = 24.455. Is that right? Then i want to ask, if the reduced chi-square1 < 1 and reduce chi-square2 > 1, how can i calculate, get the absolute value of the different? And what is the relationship of p-value and traditional sigma significance level, i.e. 3*sigma=what p-value?  
> **username_2**: @chen The method is described in my answer. The relationship between p-values and sigma are in standard statistics tables. 3 sigma is $p<0.003$.  
> **username_2**: @Chen I just realised you were asking me what happens if the new reduced chi-squared is worse than the old one. Well I think that is just about possible, but in any case it indicates that your fit has not improved so there is no significant line.  
> **username_0**: What is erf in your formula? Since the best reduced chi-square is 1, so maybe above 1 and below 1 should have equal fitting result. So in your formula Δχ2=χ21−χ22 , then if one chi-square is above 1 and another one below 1, how to calculate them? The same formula as the both are in the same side of 1?  
> **username_2**: @Chen erf is the "error function". The best reduced chi-squared is not 1. Adding more parameters to your model will always make chi-squared smaller and will usually (but not always) make the reduced chi-squared smaller. Stop thinking about reduced chi-squared since it is irrelevant to your question (or my answer).  
> **username_0**: Now i see the relationship of p-value and 3*sigma. Thank you so much for your help.  

---

