function [ratio] = find_outlier_ratio(vec)

	% This function calculate the ratio
	% of values in a given vector that 
	% are considered outliers based on 
	% the interquartile range 
	%
	% Inputs:
	% 'vec': the input vector
	%
	% Outputs:
	% 'rat': the calculated ratio of 
	% outlier values in the vector.

	vec = sort(vec);
	lvec = length(vec);
	LB = vec(floor(lvec/4))  - 1.5* (vec(floor(3*lvec/4)) - vec(floor(lvec/4)));
	UB = vec(floor(lvec/4))  + 1.5* (vec(floor(3*lvec/4)) - vec(floor(lvec/4)));
	ratio = (sum(vec<LB) + sum(vec>UB))/lvec;

end
