Beispiel #1
0
def significance():
    "Check the significance of a correlation"
    #TODO: test probability with student t
    # p = student_t(n-1, t)
    # if 1-p<=0.05 data is considered good [HUMPHREY95] p.70
    actual_loc, hours = get_projects_metrics()
    t, r2, n = calc_significance(actual_loc, hours)
    p = calc_student_t_probability(t, n - 1)

    s = 1 - p
    if s < 0.005:
        significance = "very high"
    elif s < 0.01:
        significance = "high"
    elif s < 0.05:
        significance = "good"
    elif s < 0.2:
        significance = "adequate"
    else:
        significance = "poor"

    return {
        'loc': actual_loc,
        'hours': hours,
        'n': n,
        'r2': r2,
        't': t,
        'p': p,
        's': s,
        "significance": significance
    }
Beispiel #2
0
def significance():
    "Check the significance of a correlation"
    # TODO: test probability with student t
    # p = student_t(n-1, t)
    # if 1-p<=0.05 data is considered good [HUMPHREY95] p.70
    actual_loc, hours = get_projects_metrics()
    t, r2, n = calc_significance(actual_loc, hours)
    p = calc_student_t_probability(t, n - 1)

    s = 1 - p
    if s < 0.005:
        significance = "very high"
    elif s < 0.01:
        significance = "high"
    elif s < 0.05:
        significance = "good"
    elif s < 0.2:
        significance = "adequate"
    else:
        significance = "poor"

    return {"loc": actual_loc, "hours": hours, "n": n, "r2": r2, "t": t, "p": p, "s": s, "significance": significance}
Beispiel #3
0
def significance():
    # [HUMPHREY95] p.515
    t, r2, n = calc_significance(x_values, y_values)
    p = calc_student_t_probability(t, n-1)
    return {'loc': x_values, 'hours': y_values, 'n': n, 'r2': r2, 't': t, 'ok': round(t, 4)==9.0335, 'p': p}