Hello and welcome
To calculate an average temp you need to add some samples together, and then divide the result by the number of samples.
float counter = 0.0;
uint8_t samples = 0;
float averageTemperature = 0.0;
//every time you get the temperature from the thermistor
counter += currentTemperature;
averageTemperature = counter / samples;
// don't count too much...
if ( samples > 100 )
samples = 1;
counter = averageTemperature;
(this is untested)
For the max temp, you need to periodically compare the current value with a variable. If the current value is greater than the variable, then you store it in that variable.
float maxTemperature = 0.0;
if ( currentTemperature > maxTemperature )
maxTemperature = currentTemperature;
You may want to save/load this max temp value to/from EEPROM so that you don't lose it when the arduino is reset.