function final_mean=mymean(values,frequency)
product  = values.*frequency;
final_mean = sum(product)/sum(frequency); 
endfunction
