Average select rows

I have no idea how to even get started with this script.

I need to average field 3 for each of the unique identifiers found in field 1. However, I only want to average these rows when field 2 is equal to 1506 - 2000 (note that i replaced the values field 2 for security reasons, but the real data are sequential).

001001 1500 62.6283
001001 1501 65.3417
001001 1502 65.1475
001001 1503 63.805
001001 1504 63.9375
001001 1505 64.1858
001001 1506 62.29
001001 1507 64.5242
001001 1508 62.8933
001001 1509 64.0667
001001 1510 63.6867
.....

001003 1995 66.7417
001003 1996 66.1092
001003 1997 66.5117
001003 1998 68.6833
001003 1999 67.715
001003 2000 67.5867
001003 2001 66.9783
001003 2002 67.3217
001003 2003 66.7042
001003 2004 67.1367
001003 2005 67.3717
.....

I need the results appended to each respective row.

001001  1500   62.6283	63.49
001001  1501   65.3417	63.49
001001  1502   65.1475	63.49
001001  1503   63.805	63.49
001001  1504   63.9375	63.49
001001  1505   64.1858	63.49
001001  1506   62.29    63.49
001001  1507   64.5242	63.49
001001  1508   62.8933	63.49
001001  1509   64.0667	63.49
001001  1510   63.6867	63.49
.....			
	
001003  1995	66.7417	67.22
001003  1996	66.1092	67.22
001003  1997	66.5117	67.22
001003  1998	68.6833	67.22
001003  1999	67.715	67.22
001003  2000	67.5867	67.22
001003  2001	66.9783	67.22
001003  2002	67.3217	67.22
001003  2003	66.7042	67.22
001003  2004	67.1367	67.22
001003  2005	67.3717	67.22
.....

Any help is appreciated.

Try

awk 'NR == FNR {if ($2 >=1506 && $2 <=2000) {SUM[$1] += $3; CNT[$1]++}; next} 
{print $0, SUM[$1]/CNT[$1]}' OFS="\t" OFMT="%.2f" file file

I have played around with this but could not get anything to output.

Difficult to believe as what I got was EXACTLY what you posted as desired output. It's not in vain that posters in here are requested to show at least their OS and shell versions, if not the tools used versions.

My apologies for the lack of information.

GNU Awk 3.1.7
Linux CentOS release 6.9 (Final)

Would the format of the input cause the issue? There is a single space between each field.

I don't think so, as the FS default ((multiple) whitespace) is used.
Did you supply the input file TWICE? It needs two passes.

Oh I see. Thats the first time I have had to enter the input file twice. At first glance it appears to work as you said. Thanks for the help with this one!