Ethem S. answered 10/15/19
Learn the Basics of Math and MATLAB with Former MIT Research Engineer
Average of these number is the sum of them divided by the count (there are seven numbers):
(4+7+5+6+8+n+4)/7 = (34+n) / 7
Median is the mid point of the ordered series. So, first order the numbers:
4 4 5 6 7 8 . We do not know where n may be. Let;s see possible median values:
1) If n is in the first half of the series, [n 4 4 5 6 7 8] or [4 n 4 5 6 7 8] or [4 4 n 5 6 7 8], the median is 5. Then
5 = (34+n)/7 (multiple both sides by 7)
35 = 34 + n => n = 1. This is definitely possible since it means n is the first in the series, which is in the first half. SO, this is a possible solution
2) If n is in the second half of the series, [4 4 5 6 7 8 n] or [4 4 5 6 7 n 8] or [4 4 5 6 n 7 8], the median is 6. Then
6 = (34+n)/7 (multiple both sides by 7)
42 = 34 + n => n = 8. This is definitely possible since it means n is the last in the series, which is in the second half. SO, this is a possible solution
3) n is the median [4 4 5 n 6 7 8], which means n is in the region [5 6]. n = (34 + n) /7 => 7n = 34 + n => 6n = 34 => n = 34/6 = 5.66666. So, this is a possible answer too.