awk matrix problem

hi there
I'm very new in programing and i've started with awk.
I'm processing 200 data files and I need to do some precessing on them.
The files have 3 columns with N-lines
for each line a have on the first and second value is the same for all the files and only the third is variable. like this:

file1
0.003 0.004 4
0.005 -0.003 3
-0.023 0.423 2
...
file2
0.003 0.004 5
0.005 -0.003 4
-0.023 0.423 8
...
...

I need an output that can give me a matrix than the 1st and 2nd column are the same but the 3 must be a mean of all the values of all files

outputfile
0.003 0.004 mean
0.005 -0.003 mean
-0.023 0.423 mean
...
...

i have another problem cause' sometimes the value in the 3d column is not a number (NaN) and I can't count that one for the mean.

Can anyone give me some ideias:confused:

Try...

awk '($1==$1+0)&&($2==$2+0){i=$1 OFS $2;a+=$3;b++}END{for(i in a)print i,a/b}' files*

Note that output is not sorted...

0.003 0.004 4.5
-0.023 0.423 5
0.005 -0.003 3.5

Thanks Igor
Great help!
That worked just fine but right now I've another problem, cuz my files for some lines the 3d element is a NaN (Not a Number) and I cant do the estatistic work using the increment without a routine that removes that elementes from my calculation
Have any more Ideas?
Thak you for your time!