function [p_value, avg_improvement_rate] = paired_t_test_improvement(U_SORT_delays, FCFS_delays,enviroment)
    
    if length(U_SORT_delays) ~= length(FCFS_delays)
        error('lenth need same');
    end
    
    % Mann-Whitney U 检验（Mann-Whitney U Test）
    p_value = ranksum(U_SORT_delays, FCFS_delays);

    % calculate average improvement rates
    avg_improvement_rate = ((mean(FCFS_delays) - mean(U_SORT_delays)) / mean(FCFS_delays)) * 100;

    % show result
    disp("现在对比的是：" + enviroment);
    fprintf('p value: %.4f\n', p_value);
    if p_value < 0.05
        fprintf('结果具有显著性差异 (p < 0.05)\n');
    else
        fprintf('结果不具有显著性差异 (p >= 0.05)\n');
    end

    % fprintf('每个样本的改善率: \n');
    % disp(improvement_rates);
    disp('average improvement rates:');
    disp(avg_improvement_rate);
end
