average and optimistic median analysis