My posts includes a rating of just one-5 as well as on my category page I wish to display the typical rating of all of the posts of this category. And So I know in which the area using the value is at the publish loop, but how do i get individuals values and calculate the typical outdoors the publish loop?

The simplest option would be most likely to create an assortment throughout the loop and average it in the finish.

// Before the loop

$ratings = array();

// During the loop

$ratings[] = $post_rating;

// After the loop

$average = array_sum($ratings) / count($ratings);