Algebraically closed field and Algorithms for calculating variance: Difference between pages

From formulasearchengine
(Difference between pages)
Jump to navigation Jump to search
en>ChrisGualtieri
m DMY/MDY Tagging on Date O/I/A using AWB
 
en>Op47
Remove split tag per opposition on talk page
 
Line 1: Line 1:
{{Use dmy dates|date=June 2013}}
{{merge from|Standard deviation#Rapid calculation methods|date=February 2013}}
In [[abstract algebra]], an '''algebraically closed field''' ''F'' contains a [[Zero of a function|root]] for every [[Degree of a polynomial|non-constant polynomial]] in ''F''[''x''], the [[ring of polynomials]] in the variable ''x'' with coefficients in ''F''.


==Examples==
'''Algorithms for calculating variance''' play a major role in [[statistics|statistical]] computing. A key problem in the design of good [[algorithm]]s for this problem is that formulas for the [[variance]] may involve sums of squares, which can lead to [[numerical instability]] as well as to [[arithmetic overflow]] when dealing with large values.
As an example, the [[field (mathematics)|field]] of [[real number]]s is not algebraically closed, because the polynomial equation ''x''<sup>2</sup>&nbsp;+&nbsp;1&nbsp;=&nbsp;0&nbsp; has no solution in real numbers, even though all its coefficients (1 and 0) are real. The same argument proves that no subfield of the real field is algebraically closed; in particular, the field of [[rational number]]s is not algebraically closed. Also, no [[finite field]] ''F'' is algebraically closed, because if ''a''<sub>1</sub>, ''a''<sub>2</sub>, …, ''a<sub>n</sub>'' are the elements of ''F'', then the polynomial (''x''&nbsp;&minus;&nbsp;''a''<sub>1</sub>)(''x''&nbsp;&minus;&nbsp;''a''<sub>2</sub>)&nbsp;···&nbsp;(''x''&nbsp;&minus;&nbsp;''a''<sub>''n''</sub>)&nbsp;+&nbsp;1
has no zero in ''F''. By contrast, the [[fundamental theorem of algebra]] states that the field of [[complex number]]s is algebraically closed. Another example of an algebraically closed field is the field of (complex) [[algebraic number]]s.


==Equivalent properties==
==Naïve algorithm==
Given a field ''F'', the assertion “''F'' is algebraically closed” is equivalent to other assertions:
A formula for calculating the variance of an entire [[statistical population|population]] of size ''N'' is:


===The only irreducible polynomials are those of degree one===
:<math>\sigma^2 = \displaystyle\frac {\sum_{i=1}^N x_i^2 - (\sum_{i=1}^N x_i)^2/N}{N}. \!</math>
The field ''F'' is algebraically closed if and only if the only [[irreducible polynomial]]s in the [[polynomial ring]] ''F''[''x''] are those of degree one.


The assertion “the polynomials of degree one are irreducible” is trivially true for any field. If ''F'' is algebraically closed and ''p''(''x'') is an irreducible polynomial of ''F''[''x''], then it has some root ''a'' and therefore ''p''(''x'') is a multiple of ''x''&nbsp;&minus;&nbsp;''a''. Since ''p''(''x'') is irreducible, this means that ''p''(''x'')&nbsp;=&nbsp;''k''(''x''&nbsp;&minus;&nbsp;''a''), for some ''k''&nbsp;∈&nbsp;''F''&nbsp;\&nbsp;{0}. On the other hand, if ''F'' is not algebraically closed, then there is some non-constant polynomial ''p''(''x'') in ''F''[''x''] without roots in ''F''. Let ''q''(''x'') be some irreducible factor of ''p''(''x''). Since ''p''(''x'') has no roots in ''F'', ''q''(''x'') also has no roots in ''F''. Therefore, ''q''(''x'') has degree greater than one, since every first degree polynomial has one root in ''F''.
A formula for calculating an [[estimator bias|unbiased]] estimate of the population variance from a finite [[statistical sample|sample]] of ''n'' observations is:


===Every polynomial is a product of first degree polynomials===
:<math>s^2 = \displaystyle\frac {\sum_{i=1}^n x_i^2 - (\sum_{i=1}^n x_i)^2/n}{n-1}. \!</math>
The field ''F'' is algebraically closed if and only if every polynomial ''p''(''x'') of degree ''n''&nbsp;≥&nbsp;1, with [[coefficient]]s in ''F'', [[factorization|splits into linear factors]]. In other words, there are elements ''k'',&nbsp;''x''<sub>1</sub>,&nbsp;''x''<sub>2</sub>,&nbsp;…,&nbsp;''x<sub>n</sub>'' of the field ''F'' such that ''p''(''x'')&nbsp;=&nbsp;''k''(''x''&nbsp;&minus;&nbsp;''x''<sub>1</sub>)(''x''&nbsp;&minus;&nbsp;''x''<sub>2</sub>)&nbsp;···&nbsp;(''x''&nbsp;&minus;&nbsp;''x<sub>n</sub>'').


If ''F'' has this property, then clearly every non-constant polynomial in ''F''[''x''] has some root in ''F''; in other words, ''F'' is algebraically closed. On the other hand, that the property stated here holds for ''F'' if ''F'' is algebraically closed follows from the previous property together with the fact that, for any field ''K'', any polynomial in ''K''[''x''] can be written as a product of irreducible polynomials.
Therefore a naive algorithm to calculate the estimated variance is given by the following:


===Polynomials of prime degree have roots===
<source lang="python">
J. Shipman showed in 2007 that if every polynomial over ''F'' of prime degree has a root in ''F'', then every non-constant polynomial has a root in ''F'', thus ''F'' is algebraically closed.
def naive_variance(data):
    n = 0
    Sum = 0
    Sum_sqr = 0
   
    for x in data:
        n = n + 1
        Sum = Sum + x
        Sum_sqr = Sum_sqr + x*x
   
    variance = (Sum_sqr - (Sum*Sum)/n)/(n - 1)
    return variance
</source>


===The field has no proper algebraic extension===
This algorithm can easily be adapted to compute the variance of a finite population: simply divide by ''N'' instead of ''n''&nbsp;−&nbsp;1 on the last line.
The field ''F'' is algebraically closed if and only if it has no proper [[algebraic extension]].


If ''F'' has no proper algebraic extension, let ''p''(''x'') be some irreducible polynomial in ''F''[''x'']. Then the [[quotient ring|quotient]] of ''F''[''x''] modulo the [[ideal (ring theory)|ideal]] generated by ''p''(''x'') is an algebraic extension of ''F'' whose [[degree of a field extension|degree]] is equal to the degree of ''p''(''x''). Since it is not a proper extension, its degree is 1 and therefore the degree of ''p''(''x'') is&nbsp;1.
Because <code>Sum_sqr</code> and <code>(Sum*Sum)/n</code> can be very similar numbers, [[Loss of significance|cancellation]] can lead to the [[precision (arithmetic)|precision]] of the result to be much less than the inherent precision of the [[floating-point]] arithmetic used to perform the computation. Thus this algorithm should not be used in practice.<ref name="Einarsson2005">{{cite book|author=Bo Einarsson|title=Accuracy and Reliability in Scientific Computing|url=http://books.google.com/books?id=8hrDV5EbrEsC|accessdate=17 February 2013|date=1 August 2005|publisher=SIAM|isbn=978-0-89871-584-2|page=47}}</ref><ref name="Chan1983">{{cite journal|url=http://www.cs.yale.edu/publications/techreports/tr222.pdf|author=T.F.Chan, G.H. Golub and R.J. LeVeque|title="Algorithms for computing the sample variance: Analysis and recommendations", The American Statistician, 37|pages=242–247|year=1983}}</ref> This is particularly bad if the standard deviation is small relative to the mean. However, the algorithm can be improved by adopting the method of the [[assumed mean]].


On the other hand, if ''F'' has some proper algebraic extension ''K'', then the [[Minimal polynomial (field theory)|minimal polynomial]] of an element in ''K''&nbsp;\&nbsp;''F'' is irreducible and its degree is greater than&nbsp;1.
==Two-pass algorithm==
An alternative approach, using a different formula for the variance, first computes the sample mean,
:<math>\bar x = \displaystyle \frac {\sum_{j=1}^n x_j}{n}</math>,
and then computes the sum of the squares of the differences from the mean,
:<math>\mathrm{variance} = s^2 = \displaystyle\frac {\sum_{i=1}^n (x_i - \bar x)^2}{n-1} \!</math>,
where s is the standard deviation.  This is given by the following pseudocode:


===The field has no proper finite extension===
<source lang="python">
The field ''F'' is algebraically closed if and only if it has no finite [[algebraic extension]] because if, within the [[Algebraically closed field#The field has no proper algebraic extension|previous proof]], the word “algebraic” is replaced by the word “finite”, then the proof is still valid.
def two_pass_variance(data):
    n    = 0
    sum1 = 0
    sum2 = 0
   
    for x in data:
        n    = n + 1
        sum1 = sum1 + x
   
    mean = sum1/n


===Every endomorphism of ''F<sup>n</sup>'' has some eigenvector===
    for x in data:
The field ''F'' is algebraically closed if and only if, for each natural number ''n'', every [[linear map]] from ''F<sup>n</sup>'' into itself has some [[eigenvector]].
        sum2 = sum2 + (x - mean)*(x - mean)
   
    variance = sum2/(n - 1)
    return variance
</source>


An endomorphism of ''F<sup>n</sup>'' has an eigenvector if and only if its [[characteristic polynomial]] has some root. Therefore, when ''F'' is algebraically closed, every endomorphism of ''F<sup>n</sup>'' has some eigenvector. On the other hand, if every endomorphism of ''F<sup>n</sup>'' has an eigenvector, let ''p''(''x'') be an element of ''F''[''x'']. Dividing by its leading coefficient, we get another polynomial ''q''(''x'') which has roots if and only if ''p''(''x'') has roots. But if ''q''(''x'')&nbsp;=&nbsp;''x<sup>n</sup>''&nbsp;+&nbsp;''a''<sub>''n''&nbsp;&minus;&nbsp;1</sub>''x''<sup>''n''&nbsp;&minus;&nbsp;1</sup>+&nbsp;···&nbsp;+&nbsp;''a''<sub>0</sub>, then ''q''(''x'') is the characteristic polynomial of the [[companion matrix]]
This algorithm is always numerically stable, unless n is large.<ref name="Einarsson2005"/><ref>{{cite book|first=Nicholas | last=Higham |title=Accuracy and Stability of Numerical Algorithms (2 ed) (Problem 1.10)| publisher=SIAM|year=2002}}</ref> Although it can be worse if much of the data is very close to but not precisely equal to the mean and some are quite far away from it{{Citation needed|date=November 2011}}.<!-- The first algorithm has less subtractions, that are a common form of losing precision in algorithms implemented in finite precision computers.-->
:<math>\begin{pmatrix}0&0&\cdots&0&-a_0\\1&0&\cdots&0&-a_1\\0&1&\cdots&0&-a_2\\\vdots&\vdots&\ddots&\vdots&\vdots\\0&0&\cdots&1&-a_{n-1}\end{pmatrix}.</math>


===Decomposition of rational expressions===
The results of both of these simple algorithms (I and II) can depend inordinately on the ordering of the data and can give poor results for very large data sets due to repeated roundoff error in the accumulation of the sums. Techniques such as [[compensated summation]] can be used to combat this error to a degree.
The field ''F'' is algebraically closed if and only if every [[rational function]] in one variable ''x'', with coefficients in ''F'', can be written as the sum of a polynomial function with rational functions of the form ''a''/(''x''&nbsp;&minus;&nbsp;''b'')<sup>n</sup>, where ''n'' is a natural number, and ''a'' and ''b'' are elements of ''F''.


If ''F'' is algebraically closed then, since the irreducible polynomials in ''F''[''x''] are all of degree 1, the property stated above holds by the [[Partial fraction decomposition#Statement of theorem|theorem on partial fraction decomposition]].
===Compensated variant===
The compensated-summation version of the algorithm above reads:<ref name=":0" /><!--Where did this algorithm come from?  It is not the normal form for a Kahan summation.-->


On the other hand, suppose that the property stated above holds for the field ''F''. Let ''p''(''x'') be an irreducible element in ''F''[''x'']. Then the rational function 1/''p'' can be written as the sum of a polynomial function ''q'' with rational functions of the form ''a''/(''x''&nbsp;&minus;&nbsp;''b'')<sup>n</sup>. Therefore, the rational expression
<source lang="python">
:<math>\frac1{p(x)}-q(x)=\frac{1-p(x)q(x)}{p(x)}</math>
def compensated_variance(data):
can be written as a quotient of two polynomials in which the denominator is a product of first degree polynomials. Since ''p''(''x'') is irreducible, it must divide this product and, therefore, it must also be a first degree polynomial.
    n = 0
    sum1 = 0
    for x in data:
        n = n + 1
        sum1 = sum1 + x
    mean = sum1/n
   
    sum2 = 0
    sum3 = 0
    for x in data:
        sum2 = sum2 + (x - mean)**2
        sum3 = sum3 + (x - mean)
    variance = (sum2 - sum3**2/n)/(n - 1)
    return variance
</source>


===Relatively prime polynomials and roots===
==Online algorithm==
For any field ''F'', if two polynomials ''p''(''x''),''q''(''x'')&nbsp;∈&nbsp;''F''[''x''] are [[coprime|relatively prime]] then they do not have a common root, for if ''a''&nbsp;∈&nbsp;''F'' was a common root, then&nbsp;''p''(''x'') and &nbsp;''q''(''x'') would both be multiples of ''x''&nbsp;&minus;&nbsp;''a'' and therefore they would not be relatively prime. The fields for which the reverse implication holds (that is, the fields such that whenever two polynomials have no common root then they are relatively prime) are precisely the algebraically closed fields.
It is often useful to be able to compute the variance in a single pass, inspecting each value <math>x_i</math> only once; for example, when the data are being collected without enough storage to keep all the values, or when costs of memory access dominate those of computation.  For such an [[online algorithm]], a [[recurrence relation]] is required between quantities from which the required statistics can be calculated in a numerically stable fashion.


If the field ''F'' is algebraically closed, let ''p''(''x'') and ''q''(''x'') be two polynomials which are not relatively prime and let ''r''(''x'') be their [[greatest common divisor]]. Then, since ''r''(''x'') is not constant, it will have some root ''a'', which will be then a common root of ''p''(''x'') and ''q''(''x'').
The following formulas can be used to update the [[mean]] and (estimated) variance of the sequence, for an additional element <math>x_{\mathrm{new}}</math>. Here, ''{{overline|x}}<sub>n</sub>'' denotes the sample mean of the first ''n'' samples (''x''<sub>1</sub>, ..., ''x<sub>n</sub>''), ''s''<sup>2</sup><sub>''n''</sub> their sample variance, and ''σ''<sup>2</sup><sub>''N''</sub> their population variance.


If ''F'' is not algebraically closed, let ''p''(''x'') be a polynomial whose degree is at least 1 without roots. Then ''p''(''x'') and ''p''(''x'') are not relatively prime, but they have no common roots (since none of them has roots).
:<math>\bar x_n = \frac{(n-1) \, \bar x_{n-1} + x_n}{n} = \bar x_{n-1} + \frac{x_n - \bar x_{n-1}}{n} \!</math>


==Other properties==
:<math>s^2_n = \frac{(n-2)}{(n-1)} \, s^2_{n-1} + \frac{(x_n - \bar x_{n-1})^2}{n}, \quad n>1 </math>
If ''F'' is an algebraically closed field and ''n'' is a natural number, then ''F'' contains all ''n''th roots of unity, because these are (by definition) the ''n'' (not necessarily distinct) zeroes of the polynomial ''x<sup>n</sup>''&nbsp;&minus;&nbsp;1. A field extension that is contained in an extension generated by the roots of unity is a ''cyclotomic extension'', and the extension of a field generated by all roots of unity is sometimes called its ''cyclotomic closure''. Thus algebraically closed fields are cyclotomically closed. The converse is not true. Even assuming that every polynomial of the form ''x<sup>n</sup>''&nbsp;&minus;&nbsp;''a'' splits into linear factors is not enough to assure that the field is algebraically closed.


If a proposition which can be expressed in the language of [[first-order logic]] is true for an algebraically closed field, then it is true for every algebraically closed field with the same [[Characteristic (algebra)|characteristic]]. Furthermore, if such a proposition is valid for an algebraically closed field with characteristic&nbsp;0, then not only is it valid for all other algebraically closed fields with characteristic&nbsp;0, but there is some natural number ''N'' such that the proposition is valid for every algebraically closed field with characteristic&nbsp;''p'' when ''p''&nbsp;&gt;&nbsp;''N''.<ref>See subsections ''Rings and fields'' and ''Properties of mathematical theories'' in §2 of J. Barwise's "An introduction to first-order logic".</ref>
:<math>\sigma^2_N = \frac{(N-1) \, \sigma^2_{N-1} + (x_N - \bar x_{N-1})(x_N - \bar x_{N})}{N}.</math>


Every field ''F'' has some extension which is algebraically closed. Among all such extensions there is one and ([[Up to|up to isomorphism]], but not [[essentially unique|unique isomorphism]]) only one which is an [[algebraic extension]] of ''F'';<ref>See Lang's ''Algebra'', §VII.2 or van der Waerden's ''Algebra I'', §10.1.</ref> it is called the [[algebraic closure]] of ''F''.
It turns out that a more suitable quantity for updating is the sum of squares of differences from the (current) mean, <math>\textstyle\sum_{i=1}^n (x_i - \bar x_n)^2</math>, here denoted <math>M_{2,n}</math>:


The theory of algebraically closed fields has [[quantifier elimination]].
:<math>M_{2,n}\! = M_{2,n-1} + (x_n - \bar x_{n-1})(x_n - \bar x_n)</math>
:<math>s^2_n = \frac{M_{2,n}}{n-1}</math>
:<math>\sigma^2_N = \frac{M_{2,N}}{N}</math>


==Notes==
A numerically stable algorithm is given below.  It also computes the mean.
{{Reflist}}
This algorithm is due to Knuth,<ref>[[Donald E. Knuth]] (1998). ''[[The Art of Computer Programming]]'', volume 2: ''Seminumerical Algorithms'', 3rd edn., p. 232. Boston: Addison-Wesley.</ref> who cites Welford,<ref>B. P. Welford (1962).[http://www.jstor.org/stable/1266577 "Note on a method for calculating corrected sums of squares and products"]. ''[[Technometrics]]'' 4(3):419–420.</ref> and it has been thoroughly analyzed.<ref>Chan, Tony F.; Golub, Gene H.; LeVeque, Randall J. (1983). Algorithms for Computing the Sample Variance: Analysis and Recommendations. The American Statistician 37, 242-247. http://www.jstor.org/stable/2683386</ref><ref>Ling, Robert F. (1974). Comparison of Several Algorithms for Computing Sample Means and Variances. Journal of the American Statistical Association, Vol. 69, No. 348, 859-866. {{doi|10.2307/2286154}}</ref> It is also common to denote <math>M_k = \bar x_k</math> and <math>S_k = M_{2,k}</math>.<ref>http://www.johndcook.com/standard_deviation.html</ref>
 
<source lang="python">
def online_variance(data):
    n = 0
    mean = 0
    M2 = 0
   
    for x in data:
        n = n + 1
        delta = x - mean
        mean = mean + delta/n
        M2 = M2 + delta*(x - mean)
    variance = M2/(n - 1)
    return variance
</source>
 
This algorithm is much less prone to loss of precision due to [[Catastrophic cancellation|massive cancellation]], but might not be as efficient because of the division operation inside the loop.  For a particularly robust two-pass algorithm for computing the variance, first compute and subtract an estimate of the mean, and then use this algorithm on the residuals.
 
The [[Algorithms for calculating variance#Parallel algorithm|parallel algorithm]] below illustrates how to merge multiple sets of statistics calculated online.
 
==Weighted incremental algorithm==
The algorithm can be extended to handle unequal sample weights, replacing the simple counter ''n'' with the sum of weights seen so far.  West (1979)<ref>D. H. D. West (1979). ''[[Communications of the ACM]]'', 22, 9, 532-535: ''Updating Mean and Variance Estimates: An Improved Method''</ref> suggests this incremental algorithm:
 
<source lang="python">
def weighted_incremental_variance(dataWeightPairs):
    sumweight = 0
    mean = 0
    M2 = 0
 
    for x, weight in dataWeightPairs:  # Alternatively "for x, weight in zip(data, weights):"
        temp = weight + sumweight
        delta = x - mean
        R = delta * weight / temp
        mean = mean + R
        M2 = M2 + sumweight * delta * R  # Alternatively, "M2 = M2 + weight * delta * (x−mean)"
        sumweight = temp
 
    variance_n = M2/sumweight
    variance = variance_n * len(dataWeightPairs)/(len(dataWeightPairs) - 1)
</source>
 
==Parallel algorithm==
Chan et al.<ref name=":0">{{Citation
  | last1 = Chan    | first1 = Tony F.      | author1-link = Tony F. Chan
  | last2 = Golub    | first2 = Gene H.      | author2-link = Gene H. Golub
  | last3 = LeVeque  | first3 = Randall J.
  | contribution = Updating Formulae and a Pairwise Algorithm for Computing Sample Variances.
  | title = Technical Report STAN-CS-79-773
  | publisher = Department of Computer Science, Stanford University
  | year = 1979
  | contribution-url = ftp://reports.stanford.edu/pub/cstr/reports/cs/tr/79/773/CS-TR-79-773.pdf }}.</ref> note that the above online algorithm III is a special case of an algorithm that works for any partition of the sample <math>X</math> into sets <math>X_A</math>, <math>X_B</math>:
:<math>\delta\! = \bar x_B - \bar x_A</math>
:<math>\bar x_X = \bar x_A + \delta\cdot\frac{n_B}{n_X}</math>
:<math>M_{2,X} = M_{2,A} + M_{2,B} + \delta^2\cdot\frac{n_A n_B}{n_X}</math>.
This may be useful when, for example, multiple processing units may be assigned to discrete parts of the input.
 
Chan's method for estimating the mean is numerically unstable when <math>n_A \approx n_B</math> and both are large, because the numerical error in <math>\bar x_B - \bar x_A</math> is not scaled down in the way that it is in the <math>n_B = 1</math> case. In such cases, prefer <math>\bar x_X = \frac{n_A \bar x_A + n_B \bar x_B}{n_A + n_B}</math>.
 
==Example==
Assume that all floating point operations use the standard [[IEEE 754#Double-precision 64 bit|IEEE 754 double-precision]] arithmetic. Consider the sample (4, 7, 13, 16) from an infinite population. Based on this sample, the estimated population mean is 10, and the unbiased estimate of population variance is 30.  Both Algorithm I and Algorithm II compute these values correctly.  Next consider the sample (10<sup>8</sup>&nbsp;+&nbsp;4, 10<sup>8</sup>&nbsp;+&nbsp;7, 10<sup>8</sup>&nbsp;+&nbsp;13, 10<sup>8</sup>&nbsp;+&nbsp;16), which gives rise to the same estimated variance as the first sample.  Algorithm II computes this variance estimate correctly, but Algorithm I returns 29.333333333333332 instead of 30.  While this loss of precision may be tolerable and viewed as a minor flaw of Algorithm I, it is easy to find data that reveal a major flaw in the naive algorithm: Take the sample to be (10<sup>9</sup>&nbsp;+&nbsp;4, 10<sup>9</sup>&nbsp;+&nbsp;7, 10<sup>9</sup>&nbsp;+&nbsp;13, 10<sup>9</sup>&nbsp;+&nbsp;16).  Again the estimated population variance of 30 is computed correctly by Algorithm II, but the naive algorithm now computes it as −170.66666666666666.  This is a serious problem with Algorithm I and is due to [[catastrophic cancellation]] in the subtraction of two similar numbers at the final stage of the algorithm.
 
==Higher-order statistics==
Terriberry<ref>{{Citation
| last=Terriberry
| first=Timothy B.
| year=2007
| title=Computing Higher-Order Moments Online
| url=http://people.xiph.org/~tterribe/notes/homs.html
}}</ref> extends Chan's formulae to calculating the third and fourth [[central moment]]s, needed for example when estimating [[skewness]] and [[kurtosis]]:
:<math>M_{3,X} = M_{3,A} + M_{3,B} + \delta^3\frac{n_A n_B (n_A - n_B)}{n_X^2} + 3\delta\frac{n_AM_{2,B} - n_BM_{2,A}}{n_X}</math>
:<math>\begin{align}
M_{4,X} = M_{4,A} + M_{4,B} & + \delta^4\frac{n_A n_B \left(n_A^2 - n_A n_B + n_B^2\right)}{n_X^3} \\
                    & + 6\delta^2\frac{n_A^2 M_{2,B} + n_B^2 M_{2,A}}{n_X^2} + 4\delta\frac{n_AM_{3,B} - n_BM_{3,A}}{n_X} \\
\end{align}</math>
 
Here the <math>M_k</math> are again the sums of powers of differences from the mean <math>\Sigma(x - \overline{x})^k</math>, giving
:skewness: <math>g_1 = \frac{\sqrt{n} M_3}{M_2^{3/2}},</math>
:kurtosis: <math>g_2 = \frac{n M_4}{M_2^2}-3.</math>
 
For the incremental case (i.e., <math>B = \{x\}</math>), this simplifies to:
:<math>\delta\! = x - m</math>
:<math>m' = m + \frac{\delta}{n}</math>
:<math>M_2' = M_2 + \delta^2 \frac{ n-1}{n}</math>
:<math>M_3' = M_3 + \delta^3 \frac{ (n - 1) (n - 2)}{n^2} - \frac{3\delta M_2}{n}</math>
:<math>M_4' = M_4 + \frac{\delta^4 (n - 1) (n^2 - 3n + 3)}{n^3} + \frac{6\delta^2 M_2}{n^2} - \frac{4\delta M_3}{n}</math>
 
By preserving the value <math>\delta / n</math>, only one division operation is needed and the higher-order statistics can thus be calculated for little incremental cost.
 
An example of the online algorithm for kurtosis implemented as described is:
<source lang="python">
def online_kurtosis(data):
    n = 0
    mean = 0
    M2 = 0
    M3 = 0
    M4 = 0
 
    for x in data:
        n1 = n
        n = n + 1
        delta = x - mean
        delta_n = delta / n
        delta_n2 = delta_n * delta_n
        term1 = delta * delta_n * n1
        mean = mean + delta_n
        M4 = M4 + term1 * delta_n2 * (n*n - 3*n + 3) + 6 * delta_n2 * M2 - 4 * delta_n * M3
        M3 = M3 + term1 * delta_n * (n - 2) - 3 * delta_n * M2
        M2 = M2 + term1
 
    kurtosis = (n*M4) / (M2*M2) - 3
    return kurtosis
</source>
 
Pébay<ref>{{Citation
| last=Pébay
| first=Philippe
| year=2008
| contribution=Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments
| title=Technical Report SAND2008-6212
| publisher=Sandia National Laboratories
| contribution-url=http://infoserve.sandia.gov/sand_doc/2008/086212.pdf
}}</ref>
further extends these results to arbitrary-order [[central moment]]s, for the incremental and the pairwise cases. One can also find there similar formulas for [[covariance]].
 
Choi and Sweetman
<ref name="Choi2010">{{Citation
| last1 = Choi      | first1 = Muenkeun
| last2 = Sweetman  | first2 = Bert
| year=2010
| title=Efficient Calculation of Statistical Moments for Structural Health Monitoring
| url=http://www.rms-group.org/RMS_Papers/TAMUG_Papers/MK/Efficient_Moments_2010.pdf
}}</ref>
offer two alternative methods to compute the skewness and kurtosis, each of which can save substantial computer memory requirements and CPU time in certain applications. The first approach is to compute the statistical moments by separating the data into bins and then computing the moments from the geometry of the resulting histogram, which effectively becomes a one-pass algorithm for higher moments. One benefit is that the statistical moment calculations can be carried out to arbitrary accuracy such that the computations can be tuned to the precision of, e.g., the data storage format or the original measurement hardware.  A relative histogram of a random variable can be constructed in
the conventional way: the range of potential values is
divided into bins and the number of occurrences within each bin are
counted and plotted such that the area of each rectangle equals
the portion of the sample values within that bin:
 
: <math> H(x_k)=\frac{h(x_k)}{A}</math>
 
where <math>h(x_k)</math> and <math>H(x_k)</math> represent the frequency and
the relative frequency at bin <math>x_k</math> and <math>A= \sum_{k=1}^{K} h(x_k)
\,\Delta x_k</math> is the total area of the histogram. After this
normalization, the <math>n</math> raw moments and central moments of <math>x(t)</math>
can be calculated from the relative histogram:
 
: <math>
m_n^{(h)} = \sum_{k=1}^{K}  x_k^n \, H(x_k) \Delta x_k
            = \frac{1}{A} \sum_{k=1}^{K}  x_k^n \, h(x_k) \Delta x_k
</math>
 
: <math>
\theta_n^{(h)}= \sum_{k=1}^{K} \Big(x_k-m_1^{(h)}\Big)^n \, H(x_k)\Delta x_k
              = \frac{1}{A} \sum_{k=1}^{K} \Big(x_k-m_1^{(h)}\Big)^n \, h(x_k) \Delta x_k
</math>
 
where the superscript <math>^{(h)}</math> indicates the moments are
calculated from the histogram. For constant bin width <math>\Delta
x_k=\Delta x</math> these two expressions can be simplified using <math>I= A/\Delta x</math>:
 
: <math>
m_n^{(h)}= \frac{1}{I} {\sum_{k=1}^{K} x_k^n \, h(x_k)}
</math>
 
: <math>
\theta_n^{(h)}= \frac{1}{I}{\sum_{k=1}^{K} \Big(x_k-m_1^{(h)}\Big)^n \, h(x_k)}
</math>
 
The second approach from Choi and Sweetman
<ref name="Choi2010" />
is an analytical methodology to combine statistical moments from individual segments of a time-history such that the resulting overall moments are those of the complete time-history. This methodology could be used for parallel computation of statistical moments with subsequent combination of those moments, or for combination of statistical moments computed at sequential times.
 
If <math>Q</math> sets of statistical moments are known:
<math>(\gamma_{0,q},\mu_{q},\sigma^2_{q},\alpha_{3,q},\alpha_{4,q})
\quad </math> for <math>q=1,2,...,Q </math>, then each <math>\gamma_n</math> can
be expressed in terms of the equivalent <math>n</math> raw moments:
 
: <math>
\gamma_{n,q}= m_{n,q} \gamma_{0,q} \qquad \quad \textrm{for} \quad n=1,2,3,4  \quad \text{ and } \quad q = 1,2, \dots ,Q
</math>
 
where <math>\gamma_{0,q}</math> is generally taken to be the duration of the <math>q^{th}</math> time-history, or the number of points if <math>\Delta t</math> is constant.
 
The benefit of expressing the statistical moments in
terms of <math>\gamma</math> is that the <math>Q</math> sets can be combined by
addition, and there is no upper limit on the value of <math>Q</math>.
 
: <math>
\gamma_{n,c}= \sum_{q=1}^{Q}\gamma_{n,q} \quad \quad \textrm{for} \quad n=0,1,2,3,4
</math>
 
where the subscript <math>_c</math> represents the concatenated
time-history or combined <math>\gamma</math>. These combined values of
<math>\gamma</math> can then be inversely transformed into raw moments
representing the complete concatenated time-history
 
: <math>
m_{n,c}=\frac{\gamma_{n,c}}{\gamma_{0,c}} \quad \textrm{for} \quad n=1,2,3,4
</math>
 
Known relationships between the raw moments (<math>m_n</math>) and the central moments  (<math> \theta_n = E[(x-\mu)^n])</math>)
are then used to compute the central moments of the concatenated time-history.  Finally, the statistical moments of the concatenated history are computed from the central moments:
 
: <math>
\mu_c=m_{1,c}
\ \ \ \ \ \sigma^2_c=\theta_{2,c}
\ \ \ \ \ \alpha_{3,c}=\frac{\theta_{3,c}}{\sigma_c^3}
\ \ \ \ \ \alpha_{4,c}={\frac{\theta_{4,c}}{\sigma_c^4}}-3
</math>
 
==Covariance==
Very similar algorithms can be used to compute the [[covariance]].  The naive algorithm is:
:<math>\operatorname{Cov}(X,Y) = \displaystyle\frac {\sum_{i=1}^n x_i y_i - (\sum_{i=1}^n x_i)(\sum_{i=1}^n y_i)/n}{n}. \!</math>
 
For the algorithm above, one could use the following pseudocode:
<source lang="python">
def naive_covariance(data1, data2):
    n = len(data1)
    sum12 = 0
    sum1 = sum(data1)
    sum2 = sum(data2)
 
    for i in range(n):
        sum12 += data1[i]*data2[i]
 
    covariance = (sum12 - sum1*sum2 / n) / n
    return covariance
</source>
 
A more numerically stable two-pass algorithm first computes the sample means, and then the covariance:
:<math>\bar x = \displaystyle \sum_{i=1}^n x_i/n</math>
:<math>\bar y = \displaystyle \sum_{i=1}^n y_i/n</math>
:<math>\operatorname{Cov}(X,Y) = \displaystyle\frac {\sum_{i=1}^n (x_i - \bar x)(y_i - \bar y)}{n}. \!</math>
 
The two-pass algorithm may be written as:
<source lang="python">
def two_pass_covariance(data1, data2):
    n = len(data1)
 
    mean1 = sum(data1) / n
    mean2 = sum(data2) / n
 
    covariance = 0
 
    for i in range(n):
        a = data1[i] - mean1
        b = data2[i] - mean2
        covariance += a*b / n
 
    return covariance
</source>
 
A slightly more accurate compensated version performs the full naive algorithm on the residuals.  The final sums <math>\textstyle\sum x_i</math> and <math>\textstyle\sum y_i</math> ''should'' be zero, but the second pass compensates for any small error.
 
A stable one-pass algorithm exists, similar to the one above, that computes co-moment <math>\textstyle C_n = \sum_{i=1}^n (x_i - \bar x_n)(y_i - \bar y_n)</math>:
:<math>\bar x_n = \bar x_{n-1} + \frac{x_n - \bar x_{n-1}}{n} \!</math>
:<math>\bar y_n = \bar y_{n-1} + \frac{y_n - \bar y_{n-1}}{n} \!</math>
:<math>C_n = C_{n-1} + (x_n - \bar x_n)(y_n - \bar y_{n-1}) = C_{n-1} + (y_n - \bar y_n)(x_n - \bar x_{n-1})</math>
The apparent asymmetry in that last equation is due to the fact that <math>\textstyle (x_n - \bar x_n) = \frac{n-1}{n}(x_n - \bar x_{n-1})</math>, so both update terms are equal to <math>\textstyle \frac{n-1}{n}(x_n - \bar x_{n-1})(y_n - \bar y_{n-1})</math>.  Even greater accuracy can be achieved by first computing the means, then using the stable one-pass algorithm on the residuals.
 
Thus we can compute the covariance as
:<math>\begin{align}
\operatorname{Cov}_N(X,Y) = \frac{C_N}{N} &= \frac{\operatorname{Cov}_{N-1}(X,Y)\cdot(N-1) + (x_n - \bar x_n)(y_n - \bar y_{n-1})}{N}\\
  &= \frac{\operatorname{Cov}_{N-1}(X,Y)\cdot(N-1) + (y_n - \bar y_n)(x_n - \bar x_{n-1})}{N}\\
  &= \frac{\operatorname{Cov}_{N-1}(X,Y)\cdot(N-1) + \frac{N-1}{N}(x_n - \bar x_{n-1})(y_n - \bar y_{n-1})}{N}.
\end{align}</math>
 
Likewise, there is a formula for combining the covariances of two sets that can be used to parallelize the computation:
:<math>C_X = C_A + C_B + (\bar x_A - \bar x_B)(\bar y_A - \bar y_B)\cdot\frac{n_A n_B}{n_X}</math>.
 
==See also==
*[[Computational formula for the variance]]


==References==
==References==
* {{Citation | last = Barwise | first = Jon | author-link = Jon Barwise | year = 1978 | contribution = An introduction to first-order logic | editor-last = Barwise | editor-first = Jon | title = Handbook of Mathematical Logic | series = Studies in Logic and the Foundations of Mathematics | publisher = North Holland | isbn = 0-7204-2285-X}}
<references />
* {{Lang Algebra}}
 
* {{citation|last = Shipman|first = Joseph|year = 2007|title = Improving the Fundamental Theorem of Algebra|periodical = Mathematical Intelligencer|volume = 29|issue = 4|pages = 9–14|doi=10.1007/BF02986170|issn = 0343-6993}}
==External links==
* {{Citation | last = van der Waerden | first = Bartel Leendert | author-link = Bartel Leendert van der Waerden | title = Algebra | volume = I | edition = 7th | year = 2003 | publisher = Springer-Verlag | isbn = 0-387-40624-7}}
* {{MathWorld|title=Sample Variance Computation|urlname=SampleVarianceComputation}}


{{DEFAULTSORT:Algebraically Closed Field}}
{{DEFAULTSORT:Algorithms For Calculating Variance}}
[[Category:Abstract algebra]]
[[Category:Statistical algorithms]]
[[Category:Field theory]]
[[Category:Statistical deviation and dispersion]]
[[Category:Articles with example pseudocode]]

Revision as of 01:36, 21 December 2013

Library Technician Anton from Strathroy, has many passions that include r/c helicopters, property developers in condo new launch singapore and coin collecting. Finds the beauty in planing a trip to spots around the globe, recently only returning from Old Town of Corfu.

Algorithms for calculating variance play a major role in statistical computing. A key problem in the design of good algorithms for this problem is that formulas for the variance may involve sums of squares, which can lead to numerical instability as well as to arithmetic overflow when dealing with large values.

Naïve algorithm

A formula for calculating the variance of an entire population of size N is:

A formula for calculating an unbiased estimate of the population variance from a finite sample of n observations is:

Therefore a naive algorithm to calculate the estimated variance is given by the following:

def naive_variance(data):
    n = 0
    Sum = 0
    Sum_sqr = 0
    
    for x in data:
        n = n + 1
        Sum = Sum + x
        Sum_sqr = Sum_sqr + x*x
     
    variance = (Sum_sqr - (Sum*Sum)/n)/(n - 1)
    return variance

This algorithm can easily be adapted to compute the variance of a finite population: simply divide by N instead of n − 1 on the last line.

Because Sum_sqr and (Sum*Sum)/n can be very similar numbers, cancellation can lead to the precision of the result to be much less than the inherent precision of the floating-point arithmetic used to perform the computation. Thus this algorithm should not be used in practice.[1][2] This is particularly bad if the standard deviation is small relative to the mean. However, the algorithm can be improved by adopting the method of the assumed mean.

Two-pass algorithm

An alternative approach, using a different formula for the variance, first computes the sample mean,

,

and then computes the sum of the squares of the differences from the mean,

,

where s is the standard deviation. This is given by the following pseudocode:

def two_pass_variance(data):
    n    = 0
    sum1 = 0
    sum2 = 0
    
    for x in data:
        n    = n + 1
        sum1 = sum1 + x
    
    mean = sum1/n

    for x in data:
        sum2 = sum2 + (x - mean)*(x - mean)
    
    variance = sum2/(n - 1)
    return variance

This algorithm is always numerically stable, unless n is large.[1][3] Although it can be worse if much of the data is very close to but not precisely equal to the mean and some are quite far away from itPotter or Ceramic Artist Truman Bedell from Rexton, has interests which include ceramics, best property developers in singapore developers in singapore and scrabble. Was especially enthused after visiting Alejandro de Humboldt National Park..

The results of both of these simple algorithms (I and II) can depend inordinately on the ordering of the data and can give poor results for very large data sets due to repeated roundoff error in the accumulation of the sums. Techniques such as compensated summation can be used to combat this error to a degree.

Compensated variant

The compensated-summation version of the algorithm above reads:[4]

def compensated_variance(data):
    n = 0
    sum1 = 0
    for x in data:
        n = n + 1
        sum1 = sum1 + x
    mean = sum1/n
     
    sum2 = 0
    sum3 = 0
    for x in data:
        sum2 = sum2 + (x - mean)**2
        sum3 = sum3 + (x - mean)
    variance = (sum2 - sum3**2/n)/(n - 1)
    return variance

Online algorithm

It is often useful to be able to compute the variance in a single pass, inspecting each value only once; for example, when the data are being collected without enough storage to keep all the values, or when costs of memory access dominate those of computation. For such an online algorithm, a recurrence relation is required between quantities from which the required statistics can be calculated in a numerically stable fashion.

The following formulas can be used to update the mean and (estimated) variance of the sequence, for an additional element . Here, Template:Overlinen denotes the sample mean of the first n samples (x1, ..., xn), s2n their sample variance, and σ2N their population variance.

It turns out that a more suitable quantity for updating is the sum of squares of differences from the (current) mean, , here denoted :

A numerically stable algorithm is given below. It also computes the mean. This algorithm is due to Knuth,[5] who cites Welford,[6] and it has been thoroughly analyzed.[7][8] It is also common to denote and .[9]

def online_variance(data):
    n = 0
    mean = 0
    M2 = 0
     
    for x in data:
        n = n + 1
        delta = x - mean
        mean = mean + delta/n
        M2 = M2 + delta*(x - mean)
 
    variance = M2/(n - 1)
    return variance

This algorithm is much less prone to loss of precision due to massive cancellation, but might not be as efficient because of the division operation inside the loop. For a particularly robust two-pass algorithm for computing the variance, first compute and subtract an estimate of the mean, and then use this algorithm on the residuals.

The parallel algorithm below illustrates how to merge multiple sets of statistics calculated online.

Weighted incremental algorithm

The algorithm can be extended to handle unequal sample weights, replacing the simple counter n with the sum of weights seen so far. West (1979)[10] suggests this incremental algorithm:

def weighted_incremental_variance(dataWeightPairs):
    sumweight = 0
    mean = 0
    M2 = 0

    for x, weight in dataWeightPairs:  # Alternatively "for x, weight in zip(data, weights):"
        temp = weight + sumweight
        delta = x - mean
        R = delta * weight / temp
        mean = mean + R
        M2 = M2 + sumweight * delta * R  # Alternatively, "M2 = M2 + weight * delta * (x−mean)"
        sumweight = temp

    variance_n = M2/sumweight
    variance = variance_n * len(dataWeightPairs)/(len(dataWeightPairs) - 1)

Parallel algorithm

Chan et al.[4] note that the above online algorithm III is a special case of an algorithm that works for any partition of the sample into sets , :

.

This may be useful when, for example, multiple processing units may be assigned to discrete parts of the input.

Chan's method for estimating the mean is numerically unstable when and both are large, because the numerical error in is not scaled down in the way that it is in the case. In such cases, prefer .

Example

Assume that all floating point operations use the standard IEEE 754 double-precision arithmetic. Consider the sample (4, 7, 13, 16) from an infinite population. Based on this sample, the estimated population mean is 10, and the unbiased estimate of population variance is 30. Both Algorithm I and Algorithm II compute these values correctly. Next consider the sample (108 + 4, 108 + 7, 108 + 13, 108 + 16), which gives rise to the same estimated variance as the first sample. Algorithm II computes this variance estimate correctly, but Algorithm I returns 29.333333333333332 instead of 30. While this loss of precision may be tolerable and viewed as a minor flaw of Algorithm I, it is easy to find data that reveal a major flaw in the naive algorithm: Take the sample to be (109 + 4, 109 + 7, 109 + 13, 109 + 16). Again the estimated population variance of 30 is computed correctly by Algorithm II, but the naive algorithm now computes it as −170.66666666666666. This is a serious problem with Algorithm I and is due to catastrophic cancellation in the subtraction of two similar numbers at the final stage of the algorithm.

Higher-order statistics

Terriberry[11] extends Chan's formulae to calculating the third and fourth central moments, needed for example when estimating skewness and kurtosis:

Here the are again the sums of powers of differences from the mean , giving

skewness:
kurtosis:

For the incremental case (i.e., ), this simplifies to:

By preserving the value , only one division operation is needed and the higher-order statistics can thus be calculated for little incremental cost.

An example of the online algorithm for kurtosis implemented as described is:

def online_kurtosis(data):
    n = 0
    mean = 0
    M2 = 0
    M3 = 0
    M4 = 0

    for x in data:
        n1 = n
        n = n + 1
        delta = x - mean
        delta_n = delta / n
        delta_n2 = delta_n * delta_n
        term1 = delta * delta_n * n1
        mean = mean + delta_n
        M4 = M4 + term1 * delta_n2 * (n*n - 3*n + 3) + 6 * delta_n2 * M2 - 4 * delta_n * M3
        M3 = M3 + term1 * delta_n * (n - 2) - 3 * delta_n * M2
        M2 = M2 + term1

    kurtosis = (n*M4) / (M2*M2) - 3
    return kurtosis

Pébay[12] further extends these results to arbitrary-order central moments, for the incremental and the pairwise cases. One can also find there similar formulas for covariance.

Choi and Sweetman [13] offer two alternative methods to compute the skewness and kurtosis, each of which can save substantial computer memory requirements and CPU time in certain applications. The first approach is to compute the statistical moments by separating the data into bins and then computing the moments from the geometry of the resulting histogram, which effectively becomes a one-pass algorithm for higher moments. One benefit is that the statistical moment calculations can be carried out to arbitrary accuracy such that the computations can be tuned to the precision of, e.g., the data storage format or the original measurement hardware. A relative histogram of a random variable can be constructed in the conventional way: the range of potential values is divided into bins and the number of occurrences within each bin are counted and plotted such that the area of each rectangle equals the portion of the sample values within that bin:

where and represent the frequency and the relative frequency at bin and is the total area of the histogram. After this normalization, the raw moments and central moments of can be calculated from the relative histogram:

where the superscript indicates the moments are calculated from the histogram. For constant bin width these two expressions can be simplified using :

The second approach from Choi and Sweetman [13] is an analytical methodology to combine statistical moments from individual segments of a time-history such that the resulting overall moments are those of the complete time-history. This methodology could be used for parallel computation of statistical moments with subsequent combination of those moments, or for combination of statistical moments computed at sequential times.

If sets of statistical moments are known: for , then each can be expressed in terms of the equivalent raw moments:

where is generally taken to be the duration of the time-history, or the number of points if is constant.

The benefit of expressing the statistical moments in terms of is that the sets can be combined by addition, and there is no upper limit on the value of .

where the subscript represents the concatenated time-history or combined . These combined values of can then be inversely transformed into raw moments representing the complete concatenated time-history

Known relationships between the raw moments () and the central moments () are then used to compute the central moments of the concatenated time-history. Finally, the statistical moments of the concatenated history are computed from the central moments:

Covariance

Very similar algorithms can be used to compute the covariance. The naive algorithm is:

For the algorithm above, one could use the following pseudocode:

def naive_covariance(data1, data2):
    n = len(data1)
    sum12 = 0
    sum1 = sum(data1)
    sum2 = sum(data2)

    for i in range(n):
        sum12 += data1[i]*data2[i]

    covariance = (sum12 - sum1*sum2 / n) / n
    return covariance

A more numerically stable two-pass algorithm first computes the sample means, and then the covariance:

The two-pass algorithm may be written as:

def two_pass_covariance(data1, data2):
    n = len(data1)

    mean1 = sum(data1) / n
    mean2 = sum(data2) / n	

    covariance = 0

    for i in range(n):
        a = data1[i] - mean1		
        b = data2[i] - mean2
        covariance += a*b / n

    return covariance

A slightly more accurate compensated version performs the full naive algorithm on the residuals. The final sums and should be zero, but the second pass compensates for any small error.

A stable one-pass algorithm exists, similar to the one above, that computes co-moment :

The apparent asymmetry in that last equation is due to the fact that , so both update terms are equal to . Even greater accuracy can be achieved by first computing the means, then using the stable one-pass algorithm on the residuals.

Thus we can compute the covariance as

Likewise, there is a formula for combining the covariances of two sets that can be used to parallelize the computation:

.

See also

References

  1. 1.0 1.1 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
  2. One of the biggest reasons investing in a Singapore new launch is an effective things is as a result of it is doable to be lent massive quantities of money at very low interest rates that you should utilize to purchase it. Then, if property values continue to go up, then you'll get a really high return on funding (ROI). Simply make sure you purchase one of the higher properties, reminiscent of the ones at Fernvale the Riverbank or any Singapore landed property Get Earnings by means of Renting

    In its statement, the singapore property listing - website link, government claimed that the majority citizens buying their first residence won't be hurt by the new measures. Some concessions can even be prolonged to chose teams of consumers, similar to married couples with a minimum of one Singaporean partner who are purchasing their second property so long as they intend to promote their first residential property. Lower the LTV limit on housing loans granted by monetary establishments regulated by MAS from 70% to 60% for property purchasers who are individuals with a number of outstanding housing loans on the time of the brand new housing purchase. Singapore Property Measures - 30 August 2010 The most popular seek for the number of bedrooms in Singapore is 4, followed by 2 and three. Lush Acres EC @ Sengkang

    Discover out more about real estate funding in the area, together with info on international funding incentives and property possession. Many Singaporeans have been investing in property across the causeway in recent years, attracted by comparatively low prices. However, those who need to exit their investments quickly are likely to face significant challenges when trying to sell their property – and could finally be stuck with a property they can't sell. Career improvement programmes, in-house valuation, auctions and administrative help, venture advertising and marketing, skilled talks and traisning are continuously planned for the sales associates to help them obtain better outcomes for his or her shoppers while at Knight Frank Singapore. No change Present Rules

    Extending the tax exemption would help. The exemption, which may be as a lot as $2 million per family, covers individuals who negotiate a principal reduction on their existing mortgage, sell their house short (i.e., for lower than the excellent loans), or take part in a foreclosure course of. An extension of theexemption would seem like a common-sense means to assist stabilize the housing market, but the political turmoil around the fiscal-cliff negotiations means widespread sense could not win out. Home Minority Chief Nancy Pelosi (D-Calif.) believes that the mortgage relief provision will be on the table during the grand-cut price talks, in response to communications director Nadeam Elshami. Buying or promoting of blue mild bulbs is unlawful.

    A vendor's stamp duty has been launched on industrial property for the primary time, at rates ranging from 5 per cent to 15 per cent. The Authorities might be trying to reassure the market that they aren't in opposition to foreigners and PRs investing in Singapore's property market. They imposed these measures because of extenuating components available in the market." The sale of new dual-key EC models will even be restricted to multi-generational households only. The models have two separate entrances, permitting grandparents, for example, to dwell separately. The vendor's stamp obligation takes effect right this moment and applies to industrial property and plots which might be offered inside three years of the date of buy. JLL named Best Performing Property Brand for second year running

    The data offered is for normal info purposes only and isn't supposed to be personalised investment or monetary advice. Motley Fool Singapore contributor Stanley Lim would not personal shares in any corporations talked about. Singapore private home costs increased by 1.eight% within the fourth quarter of 2012, up from 0.6% within the earlier quarter. Resale prices of government-built HDB residences which are usually bought by Singaporeans, elevated by 2.5%, quarter on quarter, the quickest acquire in five quarters. And industrial property, prices are actually double the levels of three years ago. No withholding tax in the event you sell your property. All your local information regarding vital HDB policies, condominium launches, land growth, commercial property and more

    There are various methods to go about discovering the precise property. Some local newspapers (together with the Straits Instances ) have categorised property sections and many local property brokers have websites. Now there are some specifics to consider when buying a 'new launch' rental. Intended use of the unit Every sale begins with 10 p.c low cost for finish of season sale; changes to 20 % discount storewide; follows by additional reduction of fiftyand ends with last discount of 70 % or extra. Typically there is even a warehouse sale or transferring out sale with huge mark-down of costs for stock clearance. Deborah Regulation from Expat Realtor shares her property market update, plus prime rental residences and houses at the moment available to lease Esparina EC @ Sengkang
  3. 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
  4. 4.0 4.1 Many property agents need to declare for the PIC grant in Singapore. However, not all of them know find out how to do the correct process for getting this PIC scheme from the IRAS. There are a number of steps that you need to do before your software can be approved.

    Naturally, you will have to pay a safety deposit and that is usually one month rent for annually of the settlement. That is the place your good religion deposit will likely be taken into account and will kind part or all of your security deposit. Anticipate to have a proportionate amount deducted out of your deposit if something is discovered to be damaged if you move out. It's best to you'll want to test the inventory drawn up by the owner, which can detail all objects in the property and their condition. If you happen to fail to notice any harm not already mentioned within the inventory before transferring in, you danger having to pay for it yourself.

    In case you are in search of an actual estate or Singapore property agent on-line, you simply should belief your intuition. It's because you do not know which agent is nice and which agent will not be. Carry out research on several brokers by looking out the internet. As soon as if you end up positive that a selected agent is dependable and reliable, you can choose to utilize his partnerise in finding you a home in Singapore. Most of the time, a property agent is taken into account to be good if he or she locations the contact data on his website. This may mean that the agent does not mind you calling them and asking them any questions relating to new properties in singapore in Singapore. After chatting with them you too can see them in their office after taking an appointment.

    Have handed an trade examination i.e Widespread Examination for House Brokers (CEHA) or Actual Property Agency (REA) examination, or equal; Exclusive brokers are extra keen to share listing information thus making certain the widest doable coverage inside the real estate community via Multiple Listings and Networking. Accepting a severe provide is simpler since your agent is totally conscious of all advertising activity related with your property. This reduces your having to check with a number of agents for some other offers. Price control is easily achieved. Paint work in good restore-discuss with your Property Marketing consultant if main works are still to be done. Softening in residential property prices proceed, led by 2.8 per cent decline within the index for Remainder of Central Region

    Once you place down the one per cent choice price to carry down a non-public property, it's important to accept its situation as it is whenever you move in – faulty air-con, choked rest room and all. Get round this by asking your agent to incorporate a ultimate inspection clause within the possibility-to-buy letter. HDB flat patrons routinely take pleasure in this security net. "There's a ultimate inspection of the property two days before the completion of all HDB transactions. If the air-con is defective, you can request the seller to repair it," says Kelvin.

    15.6.1 As the agent is an intermediary, generally, as soon as the principal and third party are introduced right into a contractual relationship, the agent drops out of the image, subject to any problems with remuneration or indemnification that he could have against the principal, and extra exceptionally, against the third occasion. Generally, agents are entitled to be indemnified for all liabilities reasonably incurred within the execution of the brokers´ authority.

    To achieve the very best outcomes, you must be always updated on market situations, including past transaction information and reliable projections. You could review and examine comparable homes that are currently available in the market, especially these which have been sold or not bought up to now six months. You'll be able to see a pattern of such report by clicking here It's essential to defend yourself in opposition to unscrupulous patrons. They are often very skilled in using highly unethical and manipulative techniques to try and lure you into a lure. That you must also protect your self, your loved ones, and personal belongings as you'll be serving many strangers in your home. Sign a listing itemizing of all of the objects provided by the proprietor, together with their situation. HSR Prime Recruiter 2010.
  5. Donald E. Knuth (1998). The Art of Computer Programming, volume 2: Seminumerical Algorithms, 3rd edn., p. 232. Boston: Addison-Wesley.
  6. B. P. Welford (1962)."Note on a method for calculating corrected sums of squares and products". Technometrics 4(3):419–420.
  7. Chan, Tony F.; Golub, Gene H.; LeVeque, Randall J. (1983). Algorithms for Computing the Sample Variance: Analysis and Recommendations. The American Statistician 37, 242-247. http://www.jstor.org/stable/2683386
  8. Ling, Robert F. (1974). Comparison of Several Algorithms for Computing Sample Means and Variances. Journal of the American Statistical Association, Vol. 69, No. 348, 859-866. 21 year-old Glazier James Grippo from Edam, enjoys hang gliding, industrial property developers in singapore developers in singapore and camping. Finds the entire world an motivating place we have spent 4 months at Alejandro de Humboldt National Park.
  9. http://www.johndcook.com/standard_deviation.html
  10. D. H. D. West (1979). Communications of the ACM, 22, 9, 532-535: Updating Mean and Variance Estimates: An Improved Method
  11. Many property agents need to declare for the PIC grant in Singapore. However, not all of them know find out how to do the correct process for getting this PIC scheme from the IRAS. There are a number of steps that you need to do before your software can be approved.

    Naturally, you will have to pay a safety deposit and that is usually one month rent for annually of the settlement. That is the place your good religion deposit will likely be taken into account and will kind part or all of your security deposit. Anticipate to have a proportionate amount deducted out of your deposit if something is discovered to be damaged if you move out. It's best to you'll want to test the inventory drawn up by the owner, which can detail all objects in the property and their condition. If you happen to fail to notice any harm not already mentioned within the inventory before transferring in, you danger having to pay for it yourself.

    In case you are in search of an actual estate or Singapore property agent on-line, you simply should belief your intuition. It's because you do not know which agent is nice and which agent will not be. Carry out research on several brokers by looking out the internet. As soon as if you end up positive that a selected agent is dependable and reliable, you can choose to utilize his partnerise in finding you a home in Singapore. Most of the time, a property agent is taken into account to be good if he or she locations the contact data on his website. This may mean that the agent does not mind you calling them and asking them any questions relating to new properties in singapore in Singapore. After chatting with them you too can see them in their office after taking an appointment.

    Have handed an trade examination i.e Widespread Examination for House Brokers (CEHA) or Actual Property Agency (REA) examination, or equal; Exclusive brokers are extra keen to share listing information thus making certain the widest doable coverage inside the real estate community via Multiple Listings and Networking. Accepting a severe provide is simpler since your agent is totally conscious of all advertising activity related with your property. This reduces your having to check with a number of agents for some other offers. Price control is easily achieved. Paint work in good restore-discuss with your Property Marketing consultant if main works are still to be done. Softening in residential property prices proceed, led by 2.8 per cent decline within the index for Remainder of Central Region

    Once you place down the one per cent choice price to carry down a non-public property, it's important to accept its situation as it is whenever you move in – faulty air-con, choked rest room and all. Get round this by asking your agent to incorporate a ultimate inspection clause within the possibility-to-buy letter. HDB flat patrons routinely take pleasure in this security net. "There's a ultimate inspection of the property two days before the completion of all HDB transactions. If the air-con is defective, you can request the seller to repair it," says Kelvin.

    15.6.1 As the agent is an intermediary, generally, as soon as the principal and third party are introduced right into a contractual relationship, the agent drops out of the image, subject to any problems with remuneration or indemnification that he could have against the principal, and extra exceptionally, against the third occasion. Generally, agents are entitled to be indemnified for all liabilities reasonably incurred within the execution of the brokers´ authority.

    To achieve the very best outcomes, you must be always updated on market situations, including past transaction information and reliable projections. You could review and examine comparable homes that are currently available in the market, especially these which have been sold or not bought up to now six months. You'll be able to see a pattern of such report by clicking here It's essential to defend yourself in opposition to unscrupulous patrons. They are often very skilled in using highly unethical and manipulative techniques to try and lure you into a lure. That you must also protect your self, your loved ones, and personal belongings as you'll be serving many strangers in your home. Sign a listing itemizing of all of the objects provided by the proprietor, together with their situation. HSR Prime Recruiter 2010
  12. Many property agents need to declare for the PIC grant in Singapore. However, not all of them know find out how to do the correct process for getting this PIC scheme from the IRAS. There are a number of steps that you need to do before your software can be approved.

    Naturally, you will have to pay a safety deposit and that is usually one month rent for annually of the settlement. That is the place your good religion deposit will likely be taken into account and will kind part or all of your security deposit. Anticipate to have a proportionate amount deducted out of your deposit if something is discovered to be damaged if you move out. It's best to you'll want to test the inventory drawn up by the owner, which can detail all objects in the property and their condition. If you happen to fail to notice any harm not already mentioned within the inventory before transferring in, you danger having to pay for it yourself.

    In case you are in search of an actual estate or Singapore property agent on-line, you simply should belief your intuition. It's because you do not know which agent is nice and which agent will not be. Carry out research on several brokers by looking out the internet. As soon as if you end up positive that a selected agent is dependable and reliable, you can choose to utilize his partnerise in finding you a home in Singapore. Most of the time, a property agent is taken into account to be good if he or she locations the contact data on his website. This may mean that the agent does not mind you calling them and asking them any questions relating to new properties in singapore in Singapore. After chatting with them you too can see them in their office after taking an appointment.

    Have handed an trade examination i.e Widespread Examination for House Brokers (CEHA) or Actual Property Agency (REA) examination, or equal; Exclusive brokers are extra keen to share listing information thus making certain the widest doable coverage inside the real estate community via Multiple Listings and Networking. Accepting a severe provide is simpler since your agent is totally conscious of all advertising activity related with your property. This reduces your having to check with a number of agents for some other offers. Price control is easily achieved. Paint work in good restore-discuss with your Property Marketing consultant if main works are still to be done. Softening in residential property prices proceed, led by 2.8 per cent decline within the index for Remainder of Central Region

    Once you place down the one per cent choice price to carry down a non-public property, it's important to accept its situation as it is whenever you move in – faulty air-con, choked rest room and all. Get round this by asking your agent to incorporate a ultimate inspection clause within the possibility-to-buy letter. HDB flat patrons routinely take pleasure in this security net. "There's a ultimate inspection of the property two days before the completion of all HDB transactions. If the air-con is defective, you can request the seller to repair it," says Kelvin.

    15.6.1 As the agent is an intermediary, generally, as soon as the principal and third party are introduced right into a contractual relationship, the agent drops out of the image, subject to any problems with remuneration or indemnification that he could have against the principal, and extra exceptionally, against the third occasion. Generally, agents are entitled to be indemnified for all liabilities reasonably incurred within the execution of the brokers´ authority.

    To achieve the very best outcomes, you must be always updated on market situations, including past transaction information and reliable projections. You could review and examine comparable homes that are currently available in the market, especially these which have been sold or not bought up to now six months. You'll be able to see a pattern of such report by clicking here It's essential to defend yourself in opposition to unscrupulous patrons. They are often very skilled in using highly unethical and manipulative techniques to try and lure you into a lure. That you must also protect your self, your loved ones, and personal belongings as you'll be serving many strangers in your home. Sign a listing itemizing of all of the objects provided by the proprietor, together with their situation. HSR Prime Recruiter 2010
  13. 13.0 13.1 Many property agents need to declare for the PIC grant in Singapore. However, not all of them know find out how to do the correct process for getting this PIC scheme from the IRAS. There are a number of steps that you need to do before your software can be approved.

    Naturally, you will have to pay a safety deposit and that is usually one month rent for annually of the settlement. That is the place your good religion deposit will likely be taken into account and will kind part or all of your security deposit. Anticipate to have a proportionate amount deducted out of your deposit if something is discovered to be damaged if you move out. It's best to you'll want to test the inventory drawn up by the owner, which can detail all objects in the property and their condition. If you happen to fail to notice any harm not already mentioned within the inventory before transferring in, you danger having to pay for it yourself.

    In case you are in search of an actual estate or Singapore property agent on-line, you simply should belief your intuition. It's because you do not know which agent is nice and which agent will not be. Carry out research on several brokers by looking out the internet. As soon as if you end up positive that a selected agent is dependable and reliable, you can choose to utilize his partnerise in finding you a home in Singapore. Most of the time, a property agent is taken into account to be good if he or she locations the contact data on his website. This may mean that the agent does not mind you calling them and asking them any questions relating to new properties in singapore in Singapore. After chatting with them you too can see them in their office after taking an appointment.

    Have handed an trade examination i.e Widespread Examination for House Brokers (CEHA) or Actual Property Agency (REA) examination, or equal; Exclusive brokers are extra keen to share listing information thus making certain the widest doable coverage inside the real estate community via Multiple Listings and Networking. Accepting a severe provide is simpler since your agent is totally conscious of all advertising activity related with your property. This reduces your having to check with a number of agents for some other offers. Price control is easily achieved. Paint work in good restore-discuss with your Property Marketing consultant if main works are still to be done. Softening in residential property prices proceed, led by 2.8 per cent decline within the index for Remainder of Central Region

    Once you place down the one per cent choice price to carry down a non-public property, it's important to accept its situation as it is whenever you move in – faulty air-con, choked rest room and all. Get round this by asking your agent to incorporate a ultimate inspection clause within the possibility-to-buy letter. HDB flat patrons routinely take pleasure in this security net. "There's a ultimate inspection of the property two days before the completion of all HDB transactions. If the air-con is defective, you can request the seller to repair it," says Kelvin.

    15.6.1 As the agent is an intermediary, generally, as soon as the principal and third party are introduced right into a contractual relationship, the agent drops out of the image, subject to any problems with remuneration or indemnification that he could have against the principal, and extra exceptionally, against the third occasion. Generally, agents are entitled to be indemnified for all liabilities reasonably incurred within the execution of the brokers´ authority.

    To achieve the very best outcomes, you must be always updated on market situations, including past transaction information and reliable projections. You could review and examine comparable homes that are currently available in the market, especially these which have been sold or not bought up to now six months. You'll be able to see a pattern of such report by clicking here It's essential to defend yourself in opposition to unscrupulous patrons. They are often very skilled in using highly unethical and manipulative techniques to try and lure you into a lure. That you must also protect your self, your loved ones, and personal belongings as you'll be serving many strangers in your home. Sign a listing itemizing of all of the objects provided by the proprietor, together with their situation. HSR Prime Recruiter 2010

External links



  • I had like 17 domains hosted on single account, and never had any special troubles. If you are not happy with the service you will get your money back with in 45 days, that's guaranteed. But the Search Engine utility inside the Hostgator account furnished an instant score for my launched website. Fantastico is unable to install WordPress in a directory which already have any file i.e to install WordPress using Fantastico the destination directory must be empty and it should not have any previous installation files. When you share great information, others will take note. Once your hosting is purchased, you will need to setup your domain name to point to your hosting. Money Back: All accounts of Hostgator come with a 45 day money back guarantee. If you have any queries relating to where by and how to use Hostgator Discount Coupon, you can make contact with us at our site. If you are starting up a website or don't have too much website traffic coming your way, a shared plan is more than enough. Condition you want to take advantage of the worldwide web you prerequisite a HostGator web page, -1 of the most trusted and unfailing web suppliers on the world wide web today. Since, single server is shared by 700 to 800 websites, you cannot expect much speed.



    Hostgator tutorials on how to install Wordpress need not be complicated, especially when you will be dealing with a web hosting service that is friendly for novice webmasters and a blogging platform that is as intuitive as riding a bike. After that you can get Hostgator to host your domain and use the wordpress to do the blogging. Once you start site flipping, trust me you will not be able to stop. I cut my webmaster teeth on Control Panel many years ago, but since had left for other hosting companies with more commercial (cough, cough) interfaces. If you don't like it, you can chalk it up to experience and go on. First, find a good starter template design. When I signed up, I did a search for current "HostGator codes" on the web, which enabled me to receive a one-word entry for a discount. Your posts, comments, and pictures will all be imported into your new WordPress blog.