function [ num_boom, num_bust, duration_boom, duration_bust, amplitude_average_boom, amplitude_average_bust, average_boom, average_bust ] = des_stats_boom_bust( num_country, boom_matrix, bust_matrix )


% PURPOSE: CALCULATE DESCRIPTIVE STATISTICS FOR THE BOOM/BUST EPISODES
% 
% INPUT:
%     -num_country:NUMBER OF COUNTRIES
%     -boom_matrix:MATRIX WITH ALL BOOM EPISODES
%     -bust_matrix: MATRIX WITH ALL BUST EPISODES
% 
% OUTPUT:
%     -num_boom:NUMBER OF BOOM EPISODES
%     -num_bust: NUMBER OF BUST EPISODES
%     -duration_boom: AVERAGE DURATION OF A BOOM PERIOD
%     -duration_bust: AVERAGE DURATION OF A BUST PERIOD
%     -amplitude_average_boom: HIGHEST VALUE OF OUTPUT GAP IN BOOM EPISODES
%     -amplitude_average_bust: LOWEST VALUE OF OUTPTU GAP IN BUST EPISODES
%     -average_boom: BOOM EPISODES/NUMBER OF COUNTRY RATIO
%     -average_bust: BUST EPISODES/NUMBER OF COUNTRY RATIO


    %Calculate # of boom episodes (for descriptive statistics table)
    num_boom= size(boom_matrix(:,1),1);

    %Calculate # of bust episodes (for descriptive statistics table)
    num_bust= size(bust_matrix(:,1),1);

    %Calculate the average number of booms
    average_boom=num_boom/num_country;
    
    %Calculate the average number of bust
    average_bust=num_bust/num_country;

    %Calculate the average duration of booms (for descriptive statistics table)
    duration_boom=round(mean(boom_matrix(:,3)));

    %Calculate the average duration of busts (for descriptive statistics table)
    duration_bust=round(mean(bust_matrix(:,3)));

    %Calculate the average amplitude of the boom episodes (for descriptive statistics table)
    amplitude_average_boom=mean(boom_matrix(:,4));

    %Calculate the average amplitude of the boom episodes (for descriptive statistics table)
    amplitude_average_bust=mean(bust_matrix(:,4));


end

