Код: Выделить всё
from scipy.stats import genpareto, genextreme
import numpy as np
G_x = genextreme(loc=3.930, c=-0.23, scale=0.747) # in inches
F1_x = genpareto(loc=17.402, c=-0.118, scale=37.613) # in mm
F2_x = genpareto(loc=21.007, c=0.136, scale=9.453) # in mm
F_x_cdf = lambda x: 0.4 * F1_x.cdf(x) + 0.6 * F2_x.cdf(x)
F_x_pdf = lambda x: 0.4 * F1_x.pdf(x) + 0.6 * F2_x.pdf(x)
x = np.linspace(0,800,1000)
T_F_x = G_x.ppf(F_x_cdf(x)) * 25.4 # in mm
density = G_x.pdf(T_F_x/25.4)
fig, ax = plt.subplots()
ax.plot(x, G_x.pdf(x/25.4), label="Target GEV", color='darkorange', alpha=0.5, linewidth=5)
ax.plot(x, F1_x.pdf(x), label="F1_x")
ax.plot(x, F2_x.pdf(x), label="F2_x")
ax.plot(x, F_x_pdf(x), label="G_x")
ax.plot(T_F_x, density, label="Transformed G_x", ls=":", color='red')
ax.set_xlabel("Values")
ax.set_ylabel("PDF")
ax.legend()
ax.set_xscale('log')
ax.grid(True)

Как можно с помощью этого преобразования преобразовать F1(x) и F2(x), чтобы их смесь давала преобразованное F(x).
Подробнее здесь: https://stackoverflow.com/questions/797 ... e-to-anoth