Is it possible to calculate the average rating using math Api?

Can we calculate the average rating using math Api?

No, but you can use the aggregations API https://docs.hypi.app/references/aggregations-api