Skip to content

_impact_estimate in tbrmmdiagnostics.py #16

@RaymondSHANG

Description

@RaymondSHANG

In the current code, SQ term is calculated as (line 236 in tbrmmdiagnostics.py)

sq = np.sqrt(phi * (n + 1) / (n * n_test * (n - 1)) + 1 / n + 1 / n_test)

Shall we write it as
sq = np.sqrt(phi * (n + n_test) / (n * n_test * (n - 1)) + 1 / n + 1 / n_test)

I think phi * (n + 1) / (n * n_test * (n - 1)) part is to estimate

$$\frac{(X_h - \bar{X})^2}{\sum (X_i - \bar{X})^2}$$

Which is $$\approx \frac{\sigma_x^2 (\frac{1}{n} + \frac{1}{n_{test}}) \chi^2(1)}{\sigma_x^2 \chi^2(n-1)} = F(1, n-1) \cdot \frac{\frac{n + n_{test}}{n \cdot n_{test}}}{n-1}$$

Not
$$F(1, n-1) \cdot \frac{\frac{n + 1}{n \cdot n_{test}}}{n-1}$$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions