Thursday, August 12, 2010

Formula for the Intercept and Slope

Given a two (2) variable equation of a straight line, the formula for the slope is:

Slope (b) = S xy / S x^2

where:
S = summation
x = X minus the Mean of X
y = Y minus the Mean of Y


The formula for the intercept at its point of origin is:

Intercept (a) = M Y - b (M X)

where:
M = arithmetic mean
M Y = Mean of Y
b = Slope
M X = Mean of X

Monday, June 14, 2010

Getting the Square Root and Cube Root

The OpenOffice Calc spreadsheet formula for square root is:

= sqrt ( A )

Where A = data

This can also be reformulated as:

= A^(1/2)

This reformulation is versatile as it can be extended to handle cube roots as follows:

= A^(1/3)

Harmonic Mean

The Harmonic Mean formula is:

HM = 1.5 / (0.5/A + 0.5/B + 0.5/C )

Where: A, B, and C = sample data
0.5 is the assigned weight for each sample
1.5 is the total assigned weight for all samples

Given only two samples, the formula becomes:

HM = 1 / ( 0.5/A + 0.5/B )

The manual calculation of Harmonic Mean becomes tedious as the number of samples increases.

OpenOffice Calc spreadsheet uses the following formula in calculating for the Harmonic Mean:

= harmean ( range of cells of the sample data )

Geometric Mean Formula

The geometric mean formula is:

GM = ( A * B * C ) ^ (1 / n )

Where: A, B, and C = sample data
n = is the number of samples, in this case 3

If there are only 2 sample data, the formula becomes:

GM = ( A * B ) ^ (1/2)

The calculation of the Geometric Mean becomes tedious as soon as the number of samples increases. Fortunately, modern spreadsheets can easily calculate this measure of central tendency. The OpenOffice formula for the Geometric Mean is:

=geomean( range of cells of the sample data )

Friday, October 2, 2009

What is omserv running on port 764?

There is not much information on omserv running on port 764. By doing trial and error and using the lsof command, I found that omserv is actually nfslock. If you want to turn off this service (I surely do, since I don't know and use this service), issue the command:

chkconfig --levels 2345 nfslock off

This will remove the autoexecute of the nfslock. Afterwards, issue the command to stop the process:

/etc/rc.d/init.d/nfslock stop

To verify if you have stopped the service, type the command:

nmap localhost

Monday, August 3, 2009

Installing Squid as a Service

To install the Squid Proxy Cache Server as a service under Windows, issue the command:

c:\squid\sbin\>squid.exe -f c:\squid\etc\squid.conf -i -n Squid

The name of the service is "Squid". To verify, type the command "services.msc" and look up the name of "Squid" under the name services column.

Installing PostgreSQL as a Service

To install the PostgreSQL database as a Service under Windows, issue the command the the PostgreSQL directory as follows:

c:\pgsql\bin> pg_ctl -D c:\pgsql\data register -N PostgreSQL

In the above example, PostgreSQL is the name of the PostgreSQL service. Type the command "services.msc" to verify the name "PostgreSQL".