Wikipedia:Reference desk/Archives/Mathematics/2018 December 6

= December 6 =

Confidence intervals/error bars on fit parameters
Original problem: I have N experimental observations of a certain phenomenon; the i-th experimental observation consists of a certain number of repetitions of the experiment at a parameter $$x=x_i$$, and from that I extracted the sample mean and standard deviation of the result $$y_i, \sigma_i$$. I know a predicted linear relationship between the parameter and the result: $$y=k(x-x^0)$$. I want to use the experimental data to extract the parameters' values $$k,x^0$$ and the uncertainty affecting those.

What I tried so far: get the fit parameters by least squares weighted by the reverse of the uncertainty on each point; that is, find $$k,x^0$$ as the values that minimize $$\sum_{i=1}^N \frac{\left(k(x_i-x^0)-y_i\right)^2}{\sigma_i^2}$$. That does give an estimation of the parameters, but not uncertainty bounds on them. Intuitively I would look at what $$k+\delta k$$ produces a "large" value for the weighted least squares but I do not really know how to properly do it and I am sure it has already been done before by my Google-fu was weak.

I have already read reduced chi-squared statistic which is close but not what I want. Tigraan Click here to contact me 15:20, 6 December 2018 (UTC)


 * You are doing a weighted least squares estimation of $$k$$ and $$x^0$$ in


 * $$ y_i=kx_i-(kx^0)$$


 * with intercept term $$kx^0.$$ The estimate for k is simply the estimated coefficient of $$x_i, $$ and its variance is the variance of that estimated coefficient, which is standard in regression output. We need to find the variance of $$x^0$$ given the variances of k and of the estimated intercept. I would think that you could state the variance of the estimated intercept as a probability-weighted average of the possible values of k times the variance of $$x^0$$:


 * $$var(intercept)=\int_{-\infty}^\infty f(k)\cdot var(x^0) dk=var(x^0)\cdot \int_{-\infty}^\infty f(k)dk=var(x^0),$$


 * where f(k) is the probability density of k, inferred from the regression by the estimated variance of k and a normality assumption on k. Then the only unknown in this equation is the desired var($$x^0$$), which the equation says equals the variance of the intercept. Does any of that make any sense? Loraof (talk) 19:53, 6 December 2018 (UTC)
 * I am not sure it makes sense, but the link to Weighted_least_squares was all I neeeded. Thanks! Tigraan Click here to contact me 11:04, 10 December 2018 (UTC)
 * I think that you can find all answers in Simple linear regression. Ruslik_ Zero 20:00, 8 December 2018 (UTC)
 * No, because it does not deal with the case of data with error bars. The fit parameters are the same for the dataset {(0,0±0.0001), (1,1±0.0001)} than for {(0,0±0.0001), (1,1±0.1)} but intuitively the latter should have a much larger uncertainty on the proportionality coefficient. (I could scrap the uncertainty and fit the whole set of experimental data with multiple points per parameter value, but I have some reason to expect measurement uncertainty to be higher for some values of the parameter than others.)  Tigraan Click here to contact me 11:04, 10 December 2018 (UTC)
 * See weighted least squares. Ruslik_ Zero 20:48, 10 December 2018 (UTC)

Minimal CNF form
Is the following statement correct:

Let $$\varphi$$ be a formula in CNF form over the set of variables $$X$$.

Assume that:
 * 1) For every clause all of its variables appear in their positive form. (that is, no $$\neg x$$ in the $$\varphi$$)
 * 2) Every two clauses $$c_1, c_2$$ of $$\varphi$$, satisfy $$c_1\not\subseteq c_2$$ ($$c_1$$ is not a subset of $$c_2$$)

Then $$\varphi$$ is in its minimal CNF form (there's no equivalent CNF formula with smaller size) David (talk) 18:58, 6 December 2018 (UTC)
 * I believe (A∨B)∧(¬A∨¬B)∧(A∨C)∧(¬A∨¬C)∧(B∨C)∧(¬B∨¬C) has the form you describe, but it's equivalent to False or (A)∧(¬A). Pretty sure that if there was a rule like this then you'd be able to solve SAT in polynomial time, and if such a scheme existed it's extremely unlikely it wouldn't have been found already. --RDBury (talk) 05:51, 7 December 2018 (UTC)


 * First, it's a good counterexample, so I changed my question, and replaced it with a stronger condition, under which I hope we can promise it's the minimal CNF form.


 * Second, I agree that one can't expect to get a method that works in general that decides whether or not a given formula is in its minimal CNF form (for then, SAT were in P). Nevertheless, there could be many methods for deciding in some special cases if they're in their minimal CNF form. David (talk) 12:48, 7 December 2018 (UTC)
 * Just for clarity, the original conditions were:
 * Assume that every two clauses $$c_1, c_2$$ of $$\varphi$$, satisfy:
 * $$c_1\not\subseteq c_2$$ ($$c_1$$ is not a subset of $$c_2$$)
 * $$\forall x\in X. c_1\Delta c_2\ne\{x, \neg x\} $$ (the symmetric difference of $$c_1$$ and $$c_2$$ is not equal to any variable and its negation).
 * You may have had no way of knowing this, but in general it's better to just strikethrough material in your previous posts rather than deleting; especially if someone has already replied to the original. If you're just fixing a typo or something that doesn't change the meaning then don't worry about it; WP does have a habit of inserting typos into what people have written after they hit the 'Publish' button.
 * The example is basically just a Boolean version of the statement '2 divides 3', so not that hard to dome up with if you're used to this type of conversion. The new version of the question appears in a StackExchange post. The only response missed the 'positive' part of the question, so as far as I know it's still unanswered. --RDBury (talk) 15:16, 7 December 2018 (UTC)
 * PS. I think I have a proof that, given the positive condition, the minimal expression is unique. It's not that hard so I'm a bit surprised the StackExchange people didn't find it, or maybe it's just that my proof is incorrect. In any case I'll write it up and post it in a bit. --RDBury (talk) 15:50, 7 December 2018 (UTC)
 * Proof: Let S and T be two equivalent positive expressions in CNF which are both minimal. Let {Si} be the set of clauses in S and {Tj} be the set of clauses in T. Each Si and Tj, in turn, correspondes to a subset of a set of Boolean variables {xk}. Since S is minimal, no Si is contained in Sj for j≠i, and similarly for T. For each assignment a:xk → {T, F}, define Z(a) to be the set of variables for which a is F, i.e. Z(a) is the compliment of the support of a. A clause Si evaluates to F iff Si⊆Z(a) and the expression S evaluates to F iff Si⊆Z(a) for some i. A similar statements holds for T. Fix i and define the truth assignment ai(xk) to be 'T' when xk is not in Si, in other words ai is the truth assignment so that Z(ai) = Si. The clause Si evaluates to F under this assignment, so S evaluates to F. But S and T are equivalent so T evaluates to F. Therefore Tj⊆Z(ai)= Si for sime j. Similary, for each j there is k so that Sk ⊆ Tj.(I think another way of saying this is that S and T are refinements of each other.) If Si is an element of S, then there is Tj in T so that Tj ⊆ Si, and there is an Sk so that Sk ⊆ Tj. Then Sk ⊆ Si and so, since S is minimal, i=k. We then have Si ⊆ Tj ⊆ Si, Si = Tj ∈ T. So S ⊆ T and similarly T ⊆ S, therefore S = T. --RDBury (talk) 17:04, 7 December 2018 (UTC)

The proof sounds great, so I beleive it's correct. Thank you! David (talk) 20:15, 10 December 2018 (UTC)