Statistics sensor: with average_linear, can max_age exceed recorder's purge_keep_days?

I have a statistics sensor as type average_linear. Can max_age exceed recorder’s purge_keep_days and still compute correctly?

It can but… The recorder data is needed to restore the sensor state after a restart:

https://www.home-assistant.io/integrations/statistics/

Assuming the recorder integration is running, historical sensor data is read from the database on startup and is available immediately after a restart of the platform.

So if your max age exceeds the purge keep days you may see strange values for the stats sensor after a restart. So yeah that’s a big “but” and it can only exceed the keep days if you never restart home assistant.

Got it.

Any way to specify a sensor’s recorder to be larger than everything else that’s set at purge_keep_days ?

No there is only the one global setting.