Last active
April 13, 2024 01:46
-
-
Save taruma/60725ffca91dc6e741daee9a738a978b to your computer and use it in GitHub Desktop.
taruma_hk126_log_pearson3.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "taruma_hk126_log_pearson3.ipynb", | |
"provenance": [], | |
"authorship_tag": "ABX9TyOCX6E/k41OOMJGA/iqwFsP", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/taruma/60725ffca91dc6e741daee9a738a978b/taruma_hk126_log_pearson3.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"Berdasarkan isu [#126](https://github.com/hidrokit/hidrokit/issues/126): **anfrek: Log Pearson III**\n", | |
"\n", | |
"Referensi Isu:\n", | |
"- Soetopo, W., Montarcih, L., Press, U. B., & Media, U. (2017). Rekayasa Statistika untuk Teknik Pengairan. Universitas Brawijaya Press. https://books.google.co.id/books?id=TzVTDwAAQBAJ\n", | |
"- Limantara, L. (2018). Rekayasa Hidrologi.\n", | |
"- Soewarno. (1995). hidrologi: Aplikasi Metode Statistik untuk Analisa Data. NOVA.\n", | |
"\n", | |
"\n", | |
"Deskripsi Isu:\n", | |
"- Mencari nilai ekstrim dengan kala ulang tertentu menggunakan distribusi Log Pearson III. Penerapan ini bisa digunakan untuk hujan rancangan atau debit banjir rancangan.\n", | |
"\n", | |
"Diskusi Isu:\n", | |
"- [#156](https://github.com/hidrokit/hidrokit/discussions/156) - Bagaimana menghitung periode ulang distribusi (analisis frekuensi) tanpa melihat tabel?\n", | |
"\n", | |
"Strategi:\n", | |
"- Luaran dari fungsi merupakan tabel atau array dengan kala ulang yang dapat dijadikan sebagai input, jika tidak menggunakan kala ulang yang umum (2, 5, ..., 100)\n", | |
"- Buat hasil perhitungan berdasarkan manual (tabel) dan menggunakan fungsi yang tersedia (`scipy`)." | |
], | |
"metadata": { | |
"id": "QYrqHofw6rvq" | |
} | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"# PERSIAPAN DAN DATASET" | |
], | |
"metadata": { | |
"id": "4WeDDJXIEuhU" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"id": "z3Yi5oSx54I1" | |
}, | |
"outputs": [], | |
"source": [ | |
"import numpy as np\n", | |
"import pandas as pd\n", | |
"from scipy import stats" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"import scipy\n", | |
"scipy.__version__" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 35 | |
}, | |
"id": "xMjEd2jvyWP-", | |
"outputId": "e86fdf8f-220d-4ce1-eb42-13d3d7b3b20a" | |
}, | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"'1.11.4'" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "string" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 2 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# contoh data diambil dari buku\n", | |
"# Rekayasa Hidrologi hal. 109\n", | |
"\n", | |
"_HUJAN = np.array([85, 92, 115, 116, 122, 52, 69, 95, 96, 105])\n", | |
"_TAHUN = np.arange(1998, 2008) # 1998-2007\n", | |
"\n", | |
"data = pd.DataFrame(\n", | |
" data=np.stack([_TAHUN, _HUJAN], axis=1),\n", | |
" columns=['tahun', 'hujan']\n", | |
")\n", | |
"data.tahun = pd.to_datetime(data.tahun, format='%Y')\n", | |
"data.set_index('tahun', inplace=True)\n", | |
"data" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 394 | |
}, | |
"id": "PmCeleVGEslZ", | |
"outputId": "52253457-192a-4c78-c087-ac08a57ed664" | |
}, | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" hujan\n", | |
"tahun \n", | |
"1998-01-01 85\n", | |
"1999-01-01 92\n", | |
"2000-01-01 115\n", | |
"2001-01-01 116\n", | |
"2002-01-01 122\n", | |
"2003-01-01 52\n", | |
"2004-01-01 69\n", | |
"2005-01-01 95\n", | |
"2006-01-01 96\n", | |
"2007-01-01 105" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-5b3e01d1-5981-4cff-b8f9-fce56ab449e9\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>hujan</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>tahun</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>1998-01-01</th>\n", | |
" <td>85</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1999-01-01</th>\n", | |
" <td>92</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2000-01-01</th>\n", | |
" <td>115</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2001-01-01</th>\n", | |
" <td>116</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2002-01-01</th>\n", | |
" <td>122</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2003-01-01</th>\n", | |
" <td>52</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2004-01-01</th>\n", | |
" <td>69</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2005-01-01</th>\n", | |
" <td>95</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2006-01-01</th>\n", | |
" <td>96</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2007-01-01</th>\n", | |
" <td>105</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-5b3e01d1-5981-4cff-b8f9-fce56ab449e9')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-5b3e01d1-5981-4cff-b8f9-fce56ab449e9 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-5b3e01d1-5981-4cff-b8f9-fce56ab449e9');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-e9b73b28-37b8-4ce5-b33c-c3f6c11e1f12\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-e9b73b28-37b8-4ce5-b33c-c3f6c11e1f12')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-e9b73b28-37b8-4ce5-b33c-c3f6c11e1f12 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "data", | |
"summary": "{\n \"name\": \"data\",\n \"rows\": 10,\n \"fields\": [\n {\n \"column\": \"tahun\",\n \"properties\": {\n \"dtype\": \"date\",\n \"min\": \"1998-01-01 00:00:00\",\n \"max\": \"2007-01-01 00:00:00\",\n \"num_unique_values\": 10,\n \"samples\": [\n \"2006-01-01 00:00:00\",\n \"1999-01-01 00:00:00\",\n \"2003-01-01 00:00:00\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"hujan\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 21,\n \"min\": 52,\n \"max\": 122,\n \"num_unique_values\": 10,\n \"samples\": [\n 96,\n 92,\n 52\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 3 | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"# TABEL\n", | |
"\n", | |
"Terdapat 2 tabel untuk modul `hk126` yaitu:\n", | |
"- `t_pearson3_sw`: Tabel Nilai $K$ Distribusi Pearson Tipe III dari buku _hidrologi: Aplikasi Metode Statistik untuk Analisa Data_ oleh Soewarno.\n", | |
"- `t_pearson3_st`: Tabel Distribusi Pearson Type III (nilai $K$) dari buku _Rekayasa Statistika untuk Teknik Pengairan_.\n", | |
"- `t_pearson3_lm`: Tabel Distribusi Log Pearson Tipe III Nilai G untuk Cs Positif dan Negatif\n", | |
"\n", | |
"Dalam modul `hk126` nilai $K$ akan dibangkitkan menggunakan fungsi `scipy.stats.pearson3.ppf` secara `default`. Mohon diperhatikan jika ingin menggunakan nilai $K$ yang berasal dari sumber lain." | |
], | |
"metadata": { | |
"id": "dNFHhPwGqJ-V" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# tabel dari Soewarno, hal. 219\n", | |
"# lampiran tabel III-3, Nilai k Distribusi Pearson tipe III\n", | |
"# dan Log Pearson ti\n", | |
"\n", | |
"# kode: SW\n", | |
"\n", | |
"_DATA_SW = np.array([\n", | |
" [-0.360, 0.420, 1.180, 2.278, 3.152, 4.051, 4.970, 7.250],\n", | |
" [-0.360, 0.518, 1.250, 2.262, 3.048, 3.845, 4.652, 6.600],\n", | |
" [-0.330, 0.574, 1.284, 2.240, 2.970, 3.705, 4.444, 6.200],\n", | |
" [-0.307, 0.609, 1.302, 2.219, 2.912, 3.605, 4.298, 5.910],\n", | |
" [-0.282, 0.643, 1.318, 2.193, 2.848, 3.499, 4.147, 5.660],\n", | |
" [-0.254, 0.675, 1.329, 2.163, 2.780, 3.388, 3.990, 5.390],\n", | |
" [-0.225, 0.705, 1.337, 2.128, 2.706, 3.271, 3.828, 5.110],\n", | |
" [-0.195, 0.732, 1.340, 2.087, 2.626, 3.149, 3.661, 4.820],\n", | |
" [-0.164, 0.758, 1.340, 2.043, 2.542, 3.022, 3.489, 4.540],\n", | |
" [-0.148, 0.769, 1.339, 2.018, 2.498, 2.957, 3.401, 4.395],\n", | |
" [-0.132, 0.780, 1.336, 1.998, 2.453, 2.891, 3.312, 4.250],\n", | |
" [-0.116, 0.790, 1.333, 1.967, 2.407, 2.824, 3.223, 4.105],\n", | |
" [0.099, 0.800, 1.328, 1.939, 2.359, 2.755, 3.132, 3.960],\n", | |
" [-0.083, 0.808, 1.323, 1.910, 2.311, 2.686, 3.041, 3.815],\n", | |
" [-0.066, 0.816, 1.317, 1.880, 2.261, 2.615, 2.949, 3.670],\n", | |
" [-0.050, 0.824, 1.309, 1.849, 2.211, 2.544, 2.856, 3.525],\n", | |
" [-0.033, 0.830, 1.301, 1.818, 2.159, 2.472, 2.763, 3.380],\n", | |
" [-0.017, 0.836, 1.292, 1.785, 2.107, 2.400, 2.670, 3.235],\n", | |
" [0.000, 0.842, 1.282, 1.751, 2.054, 2.326, 2.576, 3.090],\n", | |
" [0.017, 0.836, 1.270, 1.761, 2.000, 2.252, 2.482, 3.950],\n", | |
" [0.033, 0.850, 1.258, 1.680, 1.945, 2.178, 2.388, 2.810],\n", | |
" [0.050, 0.853, 1.245, 1.643, 1.890, 2.104, 2.294, 2.675],\n", | |
" [0.066, 0.855, 1.231, 1.606, 1.834, 2.029, 2.201, 2.540],\n", | |
" [0.083, 0.856, 1.216, 1.567, 1.777, 1.955, 2.108, 2.400],\n", | |
" [0.099, 0.857, 1.200, 1.528, 1.720, 1.880, 2.016, 2.275],\n", | |
" [0.116, 0.857, 1.183, 1.488, 1.663, 1.806, 1.926, 2.150],\n", | |
" [0.132, 0.856, 1.166, 1.448, 1.606, 1.733, 1.837, 2.035],\n", | |
" [0.148, 0.854, 1.147, 1.407, 1.549, 1.660, 1.749, 1.910],\n", | |
" [0.164, 0.852, 1.128, 1.366, 1.492, 1.588, 1.664, 1.800],\n", | |
" [0.195, 0.844, 1.086, 1.282, 1.379, 1.449, 1.501, 1.625],\n", | |
" [0.225, 0.832, 1.041, 1.198, 1.270, 1.318, 1.351, 1.465],\n", | |
" [0.254, 0.817, 0.994, 1.116, 1.166, 1.197, 1.216, 1.280],\n", | |
" [0.282, 0.799, 0.945, 1.035, 1.069, 1.087, 1.097, 1.130],\n", | |
" [0.307, 0.777, 0.895, 0.959, 0.980, 0.990, 1.995, 1.000],\n", | |
" [0.330, 0.752, 0.844, 0.888, 0.900, 0.905, 0.907, 0.910],\n", | |
" [0.360, 0.711, 0.771, 0.793, 0.798, 0.799, 0.800, 0.802],\n", | |
" [0.396, 0.636, 0.660, 0.666, 0.666, 0.667, 0.667, 0.668]]\n", | |
")\n", | |
"\n", | |
"_INDEX_SW = [\n", | |
" 3, 2.5, 2.2, 2, 1.8, 1.6, 1.4, 1.2, 1,\n", | |
" 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0,\n", | |
" -0.1, -0.2, -0.3, -0.4, -0.5, -0.6, -0.7, -0.8, -0.9, -1,\n", | |
" -1.2, -1.4, -1.6, -1.8, -2. , -2.2, -2.5, -3.\n", | |
"]\n", | |
"\n", | |
"_COL_SW = [0.5, 0.2, 0.1, 0.04, 0.02, 0.01, 0.005, 0.001]\n", | |
"\n", | |
"t_pearson3_sw = pd.DataFrame(data=_DATA_SW, index=_INDEX_SW, columns=_COL_SW)\n", | |
"t_pearson3_sw" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 1000 | |
}, | |
"id": "j7uQWFwTqMvv", | |
"outputId": "113387ab-56df-42a6-b036-a883b37a45b7" | |
}, | |
"execution_count": 4, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" 0.500 0.200 0.100 0.040 0.020 0.010 0.005 0.001\n", | |
" 3.0 -0.360 0.420 1.180 2.278 3.152 4.051 4.970 7.250\n", | |
" 2.5 -0.360 0.518 1.250 2.262 3.048 3.845 4.652 6.600\n", | |
" 2.2 -0.330 0.574 1.284 2.240 2.970 3.705 4.444 6.200\n", | |
" 2.0 -0.307 0.609 1.302 2.219 2.912 3.605 4.298 5.910\n", | |
" 1.8 -0.282 0.643 1.318 2.193 2.848 3.499 4.147 5.660\n", | |
" 1.6 -0.254 0.675 1.329 2.163 2.780 3.388 3.990 5.390\n", | |
" 1.4 -0.225 0.705 1.337 2.128 2.706 3.271 3.828 5.110\n", | |
" 1.2 -0.195 0.732 1.340 2.087 2.626 3.149 3.661 4.820\n", | |
" 1.0 -0.164 0.758 1.340 2.043 2.542 3.022 3.489 4.540\n", | |
" 0.9 -0.148 0.769 1.339 2.018 2.498 2.957 3.401 4.395\n", | |
" 0.8 -0.132 0.780 1.336 1.998 2.453 2.891 3.312 4.250\n", | |
" 0.7 -0.116 0.790 1.333 1.967 2.407 2.824 3.223 4.105\n", | |
" 0.6 0.099 0.800 1.328 1.939 2.359 2.755 3.132 3.960\n", | |
" 0.5 -0.083 0.808 1.323 1.910 2.311 2.686 3.041 3.815\n", | |
" 0.4 -0.066 0.816 1.317 1.880 2.261 2.615 2.949 3.670\n", | |
" 0.3 -0.050 0.824 1.309 1.849 2.211 2.544 2.856 3.525\n", | |
" 0.2 -0.033 0.830 1.301 1.818 2.159 2.472 2.763 3.380\n", | |
" 0.1 -0.017 0.836 1.292 1.785 2.107 2.400 2.670 3.235\n", | |
" 0.0 0.000 0.842 1.282 1.751 2.054 2.326 2.576 3.090\n", | |
"-0.1 0.017 0.836 1.270 1.761 2.000 2.252 2.482 3.950\n", | |
"-0.2 0.033 0.850 1.258 1.680 1.945 2.178 2.388 2.810\n", | |
"-0.3 0.050 0.853 1.245 1.643 1.890 2.104 2.294 2.675\n", | |
"-0.4 0.066 0.855 1.231 1.606 1.834 2.029 2.201 2.540\n", | |
"-0.5 0.083 0.856 1.216 1.567 1.777 1.955 2.108 2.400\n", | |
"-0.6 0.099 0.857 1.200 1.528 1.720 1.880 2.016 2.275\n", | |
"-0.7 0.116 0.857 1.183 1.488 1.663 1.806 1.926 2.150\n", | |
"-0.8 0.132 0.856 1.166 1.448 1.606 1.733 1.837 2.035\n", | |
"-0.9 0.148 0.854 1.147 1.407 1.549 1.660 1.749 1.910\n", | |
"-1.0 0.164 0.852 1.128 1.366 1.492 1.588 1.664 1.800\n", | |
"-1.2 0.195 0.844 1.086 1.282 1.379 1.449 1.501 1.625\n", | |
"-1.4 0.225 0.832 1.041 1.198 1.270 1.318 1.351 1.465\n", | |
"-1.6 0.254 0.817 0.994 1.116 1.166 1.197 1.216 1.280\n", | |
"-1.8 0.282 0.799 0.945 1.035 1.069 1.087 1.097 1.130\n", | |
"-2.0 0.307 0.777 0.895 0.959 0.980 0.990 1.995 1.000\n", | |
"-2.2 0.330 0.752 0.844 0.888 0.900 0.905 0.907 0.910\n", | |
"-2.5 0.360 0.711 0.771 0.793 0.798 0.799 0.800 0.802\n", | |
"-3.0 0.396 0.636 0.660 0.666 0.666 0.667 0.667 0.668" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-7bfc7b3b-a251-4b27-b183-6876cde48b6e\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>0.500</th>\n", | |
" <th>0.200</th>\n", | |
" <th>0.100</th>\n", | |
" <th>0.040</th>\n", | |
" <th>0.020</th>\n", | |
" <th>0.010</th>\n", | |
" <th>0.005</th>\n", | |
" <th>0.001</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>3.0</th>\n", | |
" <td>-0.360</td>\n", | |
" <td>0.420</td>\n", | |
" <td>1.180</td>\n", | |
" <td>2.278</td>\n", | |
" <td>3.152</td>\n", | |
" <td>4.051</td>\n", | |
" <td>4.970</td>\n", | |
" <td>7.250</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.5</th>\n", | |
" <td>-0.360</td>\n", | |
" <td>0.518</td>\n", | |
" <td>1.250</td>\n", | |
" <td>2.262</td>\n", | |
" <td>3.048</td>\n", | |
" <td>3.845</td>\n", | |
" <td>4.652</td>\n", | |
" <td>6.600</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.2</th>\n", | |
" <td>-0.330</td>\n", | |
" <td>0.574</td>\n", | |
" <td>1.284</td>\n", | |
" <td>2.240</td>\n", | |
" <td>2.970</td>\n", | |
" <td>3.705</td>\n", | |
" <td>4.444</td>\n", | |
" <td>6.200</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.0</th>\n", | |
" <td>-0.307</td>\n", | |
" <td>0.609</td>\n", | |
" <td>1.302</td>\n", | |
" <td>2.219</td>\n", | |
" <td>2.912</td>\n", | |
" <td>3.605</td>\n", | |
" <td>4.298</td>\n", | |
" <td>5.910</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1.8</th>\n", | |
" <td>-0.282</td>\n", | |
" <td>0.643</td>\n", | |
" <td>1.318</td>\n", | |
" <td>2.193</td>\n", | |
" <td>2.848</td>\n", | |
" <td>3.499</td>\n", | |
" <td>4.147</td>\n", | |
" <td>5.660</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1.6</th>\n", | |
" <td>-0.254</td>\n", | |
" <td>0.675</td>\n", | |
" <td>1.329</td>\n", | |
" <td>2.163</td>\n", | |
" <td>2.780</td>\n", | |
" <td>3.388</td>\n", | |
" <td>3.990</td>\n", | |
" <td>5.390</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1.4</th>\n", | |
" <td>-0.225</td>\n", | |
" <td>0.705</td>\n", | |
" <td>1.337</td>\n", | |
" <td>2.128</td>\n", | |
" <td>2.706</td>\n", | |
" <td>3.271</td>\n", | |
" <td>3.828</td>\n", | |
" <td>5.110</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1.2</th>\n", | |
" <td>-0.195</td>\n", | |
" <td>0.732</td>\n", | |
" <td>1.340</td>\n", | |
" <td>2.087</td>\n", | |
" <td>2.626</td>\n", | |
" <td>3.149</td>\n", | |
" <td>3.661</td>\n", | |
" <td>4.820</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1.0</th>\n", | |
" <td>-0.164</td>\n", | |
" <td>0.758</td>\n", | |
" <td>1.340</td>\n", | |
" <td>2.043</td>\n", | |
" <td>2.542</td>\n", | |
" <td>3.022</td>\n", | |
" <td>3.489</td>\n", | |
" <td>4.540</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.9</th>\n", | |
" <td>-0.148</td>\n", | |
" <td>0.769</td>\n", | |
" <td>1.339</td>\n", | |
" <td>2.018</td>\n", | |
" <td>2.498</td>\n", | |
" <td>2.957</td>\n", | |
" <td>3.401</td>\n", | |
" <td>4.395</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.8</th>\n", | |
" <td>-0.132</td>\n", | |
" <td>0.780</td>\n", | |
" <td>1.336</td>\n", | |
" <td>1.998</td>\n", | |
" <td>2.453</td>\n", | |
" <td>2.891</td>\n", | |
" <td>3.312</td>\n", | |
" <td>4.250</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.7</th>\n", | |
" <td>-0.116</td>\n", | |
" <td>0.790</td>\n", | |
" <td>1.333</td>\n", | |
" <td>1.967</td>\n", | |
" <td>2.407</td>\n", | |
" <td>2.824</td>\n", | |
" <td>3.223</td>\n", | |
" <td>4.105</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.6</th>\n", | |
" <td>0.099</td>\n", | |
" <td>0.800</td>\n", | |
" <td>1.328</td>\n", | |
" <td>1.939</td>\n", | |
" <td>2.359</td>\n", | |
" <td>2.755</td>\n", | |
" <td>3.132</td>\n", | |
" <td>3.960</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.5</th>\n", | |
" <td>-0.083</td>\n", | |
" <td>0.808</td>\n", | |
" <td>1.323</td>\n", | |
" <td>1.910</td>\n", | |
" <td>2.311</td>\n", | |
" <td>2.686</td>\n", | |
" <td>3.041</td>\n", | |
" <td>3.815</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.4</th>\n", | |
" <td>-0.066</td>\n", | |
" <td>0.816</td>\n", | |
" <td>1.317</td>\n", | |
" <td>1.880</td>\n", | |
" <td>2.261</td>\n", | |
" <td>2.615</td>\n", | |
" <td>2.949</td>\n", | |
" <td>3.670</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.3</th>\n", | |
" <td>-0.050</td>\n", | |
" <td>0.824</td>\n", | |
" <td>1.309</td>\n", | |
" <td>1.849</td>\n", | |
" <td>2.211</td>\n", | |
" <td>2.544</td>\n", | |
" <td>2.856</td>\n", | |
" <td>3.525</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.2</th>\n", | |
" <td>-0.033</td>\n", | |
" <td>0.830</td>\n", | |
" <td>1.301</td>\n", | |
" <td>1.818</td>\n", | |
" <td>2.159</td>\n", | |
" <td>2.472</td>\n", | |
" <td>2.763</td>\n", | |
" <td>3.380</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.1</th>\n", | |
" <td>-0.017</td>\n", | |
" <td>0.836</td>\n", | |
" <td>1.292</td>\n", | |
" <td>1.785</td>\n", | |
" <td>2.107</td>\n", | |
" <td>2.400</td>\n", | |
" <td>2.670</td>\n", | |
" <td>3.235</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>0.0</th>\n", | |
" <td>0.000</td>\n", | |
" <td>0.842</td>\n", | |
" <td>1.282</td>\n", | |
" <td>1.751</td>\n", | |
" <td>2.054</td>\n", | |
" <td>2.326</td>\n", | |
" <td>2.576</td>\n", | |
" <td>3.090</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.1</th>\n", | |
" <td>0.017</td>\n", | |
" <td>0.836</td>\n", | |
" <td>1.270</td>\n", | |
" <td>1.761</td>\n", | |
" <td>2.000</td>\n", | |
" <td>2.252</td>\n", | |
" <td>2.482</td>\n", | |
" <td>3.950</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.2</th>\n", | |
" <td>0.033</td>\n", | |
" <td>0.850</td>\n", | |
" <td>1.258</td>\n", | |
" <td>1.680</td>\n", | |
" <td>1.945</td>\n", | |
" <td>2.178</td>\n", | |
" <td>2.388</td>\n", | |
" <td>2.810</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.3</th>\n", | |
" <td>0.050</td>\n", | |
" <td>0.853</td>\n", | |
" <td>1.245</td>\n", | |
" <td>1.643</td>\n", | |
" <td>1.890</td>\n", | |
" <td>2.104</td>\n", | |
" <td>2.294</td>\n", | |
" <td>2.675</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.4</th>\n", | |
" <td>0.066</td>\n", | |
" <td>0.855</td>\n", | |
" <td>1.231</td>\n", | |
" <td>1.606</td>\n", | |
" <td>1.834</td>\n", | |
" <td>2.029</td>\n", | |
" <td>2.201</td>\n", | |
" <td>2.540</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.5</th>\n", | |
" <td>0.083</td>\n", | |
" <td>0.856</td>\n", | |
" <td>1.216</td>\n", | |
" <td>1.567</td>\n", | |
" <td>1.777</td>\n", | |
" <td>1.955</td>\n", | |
" <td>2.108</td>\n", | |
" <td>2.400</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.6</th>\n", | |
" <td>0.099</td>\n", | |
" <td>0.857</td>\n", | |
" <td>1.200</td>\n", | |
" <td>1.528</td>\n", | |
" <td>1.720</td>\n", | |
" <td>1.880</td>\n", | |
" <td>2.016</td>\n", | |
" <td>2.275</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.7</th>\n", | |
" <td>0.116</td>\n", | |
" <td>0.857</td>\n", | |
" <td>1.183</td>\n", | |
" <td>1.488</td>\n", | |
" <td>1.663</td>\n", | |
" <td>1.806</td>\n", | |
" <td>1.926</td>\n", | |
" <td>2.150</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.8</th>\n", | |
" <td>0.132</td>\n", | |
" <td>0.856</td>\n", | |
" <td>1.166</td>\n", | |
" <td>1.448</td>\n", | |
" <td>1.606</td>\n", | |
" <td>1.733</td>\n", | |
" <td>1.837</td>\n", | |
" <td>2.035</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-0.9</th>\n", | |
" <td>0.148</td>\n", | |
" <td>0.854</td>\n", | |
" <td>1.147</td>\n", | |
" <td>1.407</td>\n", | |
" <td>1.549</td>\n", | |
" <td>1.660</td>\n", | |
" <td>1.749</td>\n", | |
" <td>1.910</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-1.0</th>\n", | |
" <td>0.164</td>\n", | |
" <td>0.852</td>\n", | |
" <td>1.128</td>\n", | |
" <td>1.366</td>\n", | |
" <td>1.492</td>\n", | |
" <td>1.588</td>\n", | |
" <td>1.664</td>\n", | |
" <td>1.800</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-1.2</th>\n", | |
" <td>0.195</td>\n", | |
" <td>0.844</td>\n", | |
" <td>1.086</td>\n", | |
" <td>1.282</td>\n", | |
" <td>1.379</td>\n", | |
" <td>1.449</td>\n", | |
" <td>1.501</td>\n", | |
" <td>1.625</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-1.4</th>\n", | |
" <td>0.225</td>\n", | |
" <td>0.832</td>\n", | |
" <td>1.041</td>\n", | |
" <td>1.198</td>\n", | |
" <td>1.270</td>\n", | |
" <td>1.318</td>\n", | |
" <td>1.351</td>\n", | |
" <td>1.465</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-1.6</th>\n", | |
" <td>0.254</td>\n", | |
" <td>0.817</td>\n", | |
" <td>0.994</td>\n", | |
" <td>1.116</td>\n", | |
" <td>1.166</td>\n", | |
" <td>1.197</td>\n", | |
" <td>1.216</td>\n", | |
" <td>1.280</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-1.8</th>\n", | |
" <td>0.282</td>\n", | |
" <td>0.799</td>\n", | |
" <td>0.945</td>\n", | |
" <td>1.035</td>\n", | |
" <td>1.069</td>\n", | |
" <td>1.087</td>\n", | |
" <td>1.097</td>\n", | |
" <td>1.130</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.0</th>\n", | |
" <td>0.307</td>\n", | |
" <td>0.777</td>\n", | |
" <td>0.895</td>\n", | |
" <td>0.959</td>\n", | |
" <td>0.980</td>\n", | |
" <td>0.990</td>\n", | |
" <td>1.995</td>\n", | |
" <td>1.000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.2</th>\n", | |
" <td>0.330</td>\n", | |
" <td>0.752</td>\n", | |
" <td>0.844</td>\n", | |
" <td>0.888</td>\n", | |
" <td>0.900</td>\n", | |
" <td>0.905</td>\n", | |
" <td>0.907</td>\n", | |
" <td>0.910</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.5</th>\n", | |
" <td>0.360</td>\n", | |
" <td>0.711</td>\n", | |
" <td>0.771</td>\n", | |
" <td>0.793</td>\n", | |
" <td>0.798</td>\n", | |
" <td>0.799</td>\n", | |
" <td>0.800</td>\n", | |
" <td>0.802</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-3.0</th>\n", | |
" <td>0.396</td>\n", | |
" <td>0.636</td>\n", | |
" <td>0.660</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.667</td>\n", | |
" <td>0.667</td>\n", | |
" <td>0.668</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-7bfc7b3b-a251-4b27-b183-6876cde48b6e')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-7bfc7b3b-a251-4b27-b183-6876cde48b6e button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-7bfc7b3b-a251-4b27-b183-6876cde48b6e');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-1ae34133-2f91-4ed3-ab8f-83185d9ce935\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-1ae34133-2f91-4ed3-ab8f-83185d9ce935')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-1ae34133-2f91-4ed3-ab8f-83185d9ce935 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "t_pearson3_sw", | |
"summary": "{\n \"name\": \"t_pearson3_sw\",\n \"rows\": 37,\n \"fields\": [\n {\n \"column\": 0.5,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.21246059164702288,\n \"min\": -0.36,\n \"max\": 0.396,\n \"num_unique_values\": 35,\n \"samples\": [\n 0.164,\n -0.066,\n 0.132\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.2,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.10606126055724112,\n \"min\": 0.42,\n \"max\": 0.857,\n \"num_unique_values\": 34,\n \"samples\": [\n 0.824,\n 0.85,\n 0.832\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.1,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.1753438749271684,\n \"min\": 0.66,\n \"max\": 1.34,\n \"num_unique_values\": 36,\n \"samples\": [\n 0.66,\n 1.317,\n 1.147\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.04,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.447689658167385,\n \"min\": 0.666,\n \"max\": 2.278,\n \"num_unique_values\": 37,\n \"samples\": [\n 1.785,\n 1.91,\n 2.193\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.02,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.6782896537279295,\n \"min\": 0.666,\n \"max\": 3.152,\n \"num_unique_values\": 37,\n \"samples\": [\n 2.107,\n 2.311,\n 2.848\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.01,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.919011260375354,\n \"min\": 0.667,\n \"max\": 4.051,\n \"num_unique_values\": 37,\n \"samples\": [\n 2.4,\n 2.686,\n 3.499\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.005,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.1392442466185437,\n \"min\": 0.667,\n \"max\": 4.97,\n \"num_unique_values\": 37,\n \"samples\": [\n 2.67,\n 3.041,\n 4.147\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.001,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.765373333747711,\n \"min\": 0.668,\n \"max\": 7.25,\n \"num_unique_values\": 37,\n \"samples\": [\n 3.235,\n 3.815,\n 5.66\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 4 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# Tabel dari Soetopo hal. 105\n", | |
"# Tabel Distribusi Pearson Type III (nilai K)\n", | |
"\n", | |
"# KODE: ST\n", | |
"\n", | |
"_DATA_ST = [\n", | |
" [-4.051, -2.003, -1.180, -0.420, 0.396, 0.636, 0.660, 0.666, 0.666, 0.667, 0.667, 0.667],\n", | |
" [-4.013, -2.007, -1.195, -0.440, 0.390, 0.651, 0.681, 0.688, 0.689, 0.690, 0.690, 0.690],\n", | |
" [-3.973, -2.010, -1.210, -0.460, 0.384, 0.666, 0.702, 0.712, 0.714, 0.714, 0.714, 0.714],\n", | |
" [-3.932, -2.012, -1.224, -0.479, 0.376, 0.681, 0.724, 0.738, 0.740, 0.740, 0.741, 0.741],\n", | |
" [-3.889, -2.013, -1.238, -0.499, 0.369, 0.696, 0.747, 0.765, 0.768, 0.769, 0.769, 0.769],\n", | |
" [-3.845, -2.012, -1.250, -0.518, 0.360, 0.711, 0.771, 0.793, 0.798, 0.799, 0.800, 0.800],\n", | |
" [-3.800, -2.011, -1.262, -0.537, 0.351, 0.725, 0.795, 0.823, 0.830, 0.832, 0.833, 0.833],\n", | |
" [-3.753, -2.009, -1.274, -0.555, 0.341, 0.739, 0.819, 0.855, 0.864, 0.867, 0.869, 0.869],\n", | |
" [-3.705, -2.006, -1.284, -0.574, 0.330, 0.752, 0.844, 0.888, 0.900, 0.905, 0.907, 0.909],\n", | |
" [-3.656, -2.001, -1.294, -0.592, 0.319, 0.765, 0.869, 0.923, 0.939, 0.946, 0.949, 0.952],\n", | |
" [-3.605, -1.996, -1.303, -0.609, 0.307, 0.777, 0.895, 0.959, 0.980, 0.990, 0.995, 0.999],\n", | |
" [-3.553, -1.989, -1.311, -0.627, 0.294, 0.788, 0.920, 0.997, 1.023, 1.037, 1.044, 1.051],\n", | |
" [-3.499, -1.981, -1.318, -0.643, 0.282, 0.799, 0.945, 1.035, 1.069, 1.087, 1.097, 1.107],\n", | |
" [-3.444, -1.972, -1.324, -0.660, 0.268, 0.808, 0.970, 1.075, 1.116, 1.140, 1.155, 1.170],\n", | |
" [-3.388, -1.962, -1.329, -0.675, 0.254, 0.817, 0.994, 1.116, 1.166, 1.197, 1.216, 1.238],\n", | |
" [-3.330, -1.951, -1.333, -0.691, 0.240, 0.825, 1.018, 1.157, 1.217, 1.256, 1.282, 1.313],\n", | |
" [-3.271, -1.938, -1.337, -0.705, 0.225, 0.832, 1.041, 1.198, 1.270, 1.318, 1.351, 1.394],\n", | |
" [-3.211, -1.925, -1.339, -0.719, 0.210, 0.838, 1.064, 1.240, 1.324, 1.383, 1.424, 1.482],\n", | |
" [-3.149, -1.910, -1.340, -0.733, 0.195, 0.844, 1.086, 1.282, 1.379, 1.449, 1.501, 1.577],\n", | |
" [-3.087, -1.894, -1.341, -0.745, 0.180, 0.848, 1.107, 1.324, 1.435, 1.518, 1.581, 1.678],\n", | |
" [-3.023, -1.877, -1.340, -0.758, 0.164, 0.852, 1.128, 1.366, 1.492, 1.588, 1.664, 1.786],\n", | |
" [-2.957, -1.859, -1.339, -0.769, 0.148, 0.854, 1.147, 1.407, 1.549, 1.660, 1.749, 1.899],\n", | |
" [-2.891, -1.839, -1.336, -0.780, 0.132, 0.856, 1.166, 1.448, 1.606, 1.733, 1.837, 2.017],\n", | |
" [-2.824, -1.819, -1.333, -0.790, 0.116, 0.857, 1.183, 1.489, 1.663, 1.806, 1.926, 2.141],\n", | |
" [-2.755, -1.797, -1.329, -0.800, 0.099, 0.857, 1.200, 1.528, 1.720, 1.880, 2.016, 2.268],\n", | |
" [-2.686, -1.774, -1.323, -0.808, 0.083, 0.857, 1.216, 1.567, 1.777, 1.955, 2.108, 2.399],\n", | |
" [-2.615, -1.750, -1.317, -0.816, 0.067, 0.855, 1.231, 1.606, 1.834, 2.029, 2.201, 2.533],\n", | |
" [-2.544, -1.726, -1.309, -0.824, 0.050, 0.853, 1.245, 1.643, 1.890, 2.104, 2.294, 2.669],\n", | |
" [-2.472, -1.700, -1.301, -0.830, 0.033, 0.850, 1.258, 1.680, 1.945, 2.178, 2.388, 2.808],\n", | |
" [-2.400, -1.673, -1.292, -0.836, 0.017, 0.846, 1.270, 1.716, 2.000, 2.253, 2.482, 2.948],\n", | |
" [-2.326, -1.645, -1.282, -0.842, 0.000, 0.842, 1.282, 1.751, 2.054, 2.326, 2.576, 3.090],\n", | |
" [-2.253, -1.616, -1.270, -0.846, -0.017, 0.836, 1.292, 1.785, 2.107, 2.400, 2.670, 3.233],\n", | |
" [-2.178, -1.586, -1.258, -0.850, -0.033, 0.830, 1.301, 1.818, 2.159, 2.472, 2.763, 3.377],\n", | |
" [-2.104, -1.555, -1.245, -0.853, -0.050, 0.824, 1.309, 1.849, 2.211, 2.544, 2.856, 3.521],\n", | |
" [-2.029, -1.524, -1.231, -0.855, -0.067, 0.816, 1.317, 1.880, 2.261, 2.615, 2.949, 3.666],\n", | |
" [-1.955, -1.491, -1.216, -0.857, -0.083, 0.808, 1.323, 1.910, 2.311, 2.686, 3.041, 3.811],\n", | |
" [-1.880, -1.458, -1.200, -0.857, -0.099, 0.800, 1.329, 1.939, 2.359, 2.755, 3.132, 3.956],\n", | |
" [-1.806, -1.423, -1.183, -0.857, -0.116, 0.790, 1.333, 1.967, 2.407, 2.824, 3.223, 4.100],\n", | |
" [-1.733, -1.389, -1.166, -0.856, -0.132, 0.780, 1.336, 1.993, 2.453, 2.891, 3.312, 4.244],\n", | |
" [-1.660, -1.353, -1.147, -0.854, -0.148, 0.769, 1.339, 2.018, 2.498, 2.957, 3.401, 4.388],\n", | |
" [-1.588, -1.317, -1.128, -0.852, -0.164, 0.758, 1.340, 2.043, 2.542, 3.023, 3.489, 4.531],\n", | |
" [-1.518, -1.280, -1.107, -0.848, -0.180, 0.745, 1.341, 2.066, 2.585, 3.087, 3.575, 4.673],\n", | |
" [-1.449, -1.243, -1.086, -0.844, -0.195, 0.733, 1.340, 2.088, 2.626, 3.149, 3.661, 4.815],\n", | |
" [-1.383, -1.206, -1.064, -0.838, -0.210, 0.719, 1.339, 2.108, 2.667, 3.211, 3.745, 4.955],\n", | |
" [-1.318, -1.168, -1.041, -0.832, -0.225, 0.705, 1.337, 2.128, 2.706, 3.271, 3.828, 5.095],\n", | |
" [-1.256, -1.131, -1.018, -0.825, -0.240, 0.691, 1.333, 2.146, 2.743, 3.330, 3.910, 5.234],\n", | |
" [-1.197, -1.093, -0.994, -0.817, -0.254, 0.675, 1.329, 2.163, 2.780, 3.388, 3.990, 5.371],\n", | |
" [-1.140, -1.056, -0.970, -0.808, -0.268, 0.660, 1.324, 2.179, 2.815, 3.444, 4.069, 5.507],\n", | |
" [-1.087, -1.020, -0.945, -0.799, -0.282, 0.643, 1.318, 2.193, 2.848, 3.499, 4.147, 5.642],\n", | |
" [-1.037, -0.984, -0.920, -0.788, -0.294, 0.627, 1.311, 2.207, 2.881, 3.553, 4.223, 5.775],\n", | |
" [-0.990, -0.949, -0.895, -0.777, -0.307, 0.609, 1.303, 2.219, 2.912, 3.605, 4.298, 5.908],\n", | |
" [-0.946, -0.915, -0.869, -0.765, -0.319, 0.592, 1.294, 2.230, 2.942, 3.656, 4.372, 6.039],\n", | |
" [-0.905, -0.882, -0.844, -0.752, -0.330, 0.574, 1.284, 2.240, 2.970, 3.705, 4.444, 6.168],\n", | |
" [-0.867, -0.850, -0.819, -0.739, -0.341, 0.555, 1.274, 2.248, 2.997, 3.753, 4.515, 6.296],\n", | |
" [-0.832, -0.819, -0.795, -0.725, -0.351, 0.537, 1.262, 2.256, 3.023, 3.800, 4.584, 6.423],\n", | |
" [-0.799, -0.790, -0.771, -0.711, -0.360, 0.518, 1.250, 2.262, 3.048, 3.845, 4.652, 6.548],\n", | |
" [-0.769, -0.762, -0.747, -0.696, -0.369, 0.499, 1.238, 2.267, 3.071, 3.889, 4.718, 6.672],\n", | |
" [-0.740, -0.736, -0.724, -0.681, -0.376, 0.479, 1.224, 2.272, 3.093, 3.932, 4.783, 6.794],\n", | |
" [-0.714, -0.711, -0.702, -0.666, -0.384, 0.460, 1.210, 2.275, 3.114, 3.973, 4.847, 6.915],\n", | |
" [-0.690, -0.688, -0.681, -0.651, -0.390, 0.440, 1.195, 2.277, 3.134, 4.013, 4.909, 7.034],\n", | |
" [-0.667, -0.665, -0.660, -0.636, -0.396, 0.420, 1.180, 2.278, 3.152, 4.051, 4.970, 7.152]\n", | |
"]\n", | |
"\n", | |
"_INDEX_ST = np.arange(-30, 31, 1)/10\n", | |
"\n", | |
"_COL_ST = np.array([99, 95, 90, 80, 50, 20, 10, 4, 2, 1, 0.5, 0.1])/100\n", | |
"\n", | |
"t_pearson3_st = pd.DataFrame(data=_DATA_ST, index=_INDEX_ST, columns=_COL_ST)\n", | |
"t_pearson3_st" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 424 | |
}, | |
"id": "Kbd8cQJPqN82", | |
"outputId": "ee19d77c-e19f-4669-f242-2a62dfd5b97c" | |
}, | |
"execution_count": 5, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" 0.990 0.950 0.900 0.800 0.500 0.200 0.100 0.040 0.020 0.010 \\\n", | |
"-3.0 -4.051 -2.003 -1.180 -0.420 0.396 0.636 0.660 0.666 0.666 0.667 \n", | |
"-2.9 -4.013 -2.007 -1.195 -0.440 0.390 0.651 0.681 0.688 0.689 0.690 \n", | |
"-2.8 -3.973 -2.010 -1.210 -0.460 0.384 0.666 0.702 0.712 0.714 0.714 \n", | |
"-2.7 -3.932 -2.012 -1.224 -0.479 0.376 0.681 0.724 0.738 0.740 0.740 \n", | |
"-2.6 -3.889 -2.013 -1.238 -0.499 0.369 0.696 0.747 0.765 0.768 0.769 \n", | |
"... ... ... ... ... ... ... ... ... ... ... \n", | |
" 2.6 -0.769 -0.762 -0.747 -0.696 -0.369 0.499 1.238 2.267 3.071 3.889 \n", | |
" 2.7 -0.740 -0.736 -0.724 -0.681 -0.376 0.479 1.224 2.272 3.093 3.932 \n", | |
" 2.8 -0.714 -0.711 -0.702 -0.666 -0.384 0.460 1.210 2.275 3.114 3.973 \n", | |
" 2.9 -0.690 -0.688 -0.681 -0.651 -0.390 0.440 1.195 2.277 3.134 4.013 \n", | |
" 3.0 -0.667 -0.665 -0.660 -0.636 -0.396 0.420 1.180 2.278 3.152 4.051 \n", | |
"\n", | |
" 0.005 0.001 \n", | |
"-3.0 0.667 0.667 \n", | |
"-2.9 0.690 0.690 \n", | |
"-2.8 0.714 0.714 \n", | |
"-2.7 0.741 0.741 \n", | |
"-2.6 0.769 0.769 \n", | |
"... ... ... \n", | |
" 2.6 4.718 6.672 \n", | |
" 2.7 4.783 6.794 \n", | |
" 2.8 4.847 6.915 \n", | |
" 2.9 4.909 7.034 \n", | |
" 3.0 4.970 7.152 \n", | |
"\n", | |
"[61 rows x 12 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-728f0046-92cd-4039-88d1-e8f45316d881\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>0.990</th>\n", | |
" <th>0.950</th>\n", | |
" <th>0.900</th>\n", | |
" <th>0.800</th>\n", | |
" <th>0.500</th>\n", | |
" <th>0.200</th>\n", | |
" <th>0.100</th>\n", | |
" <th>0.040</th>\n", | |
" <th>0.020</th>\n", | |
" <th>0.010</th>\n", | |
" <th>0.005</th>\n", | |
" <th>0.001</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>-3.0</th>\n", | |
" <td>-4.051</td>\n", | |
" <td>-2.003</td>\n", | |
" <td>-1.180</td>\n", | |
" <td>-0.420</td>\n", | |
" <td>0.396</td>\n", | |
" <td>0.636</td>\n", | |
" <td>0.660</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.667</td>\n", | |
" <td>0.667</td>\n", | |
" <td>0.667</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.9</th>\n", | |
" <td>-4.013</td>\n", | |
" <td>-2.007</td>\n", | |
" <td>-1.195</td>\n", | |
" <td>-0.440</td>\n", | |
" <td>0.390</td>\n", | |
" <td>0.651</td>\n", | |
" <td>0.681</td>\n", | |
" <td>0.688</td>\n", | |
" <td>0.689</td>\n", | |
" <td>0.690</td>\n", | |
" <td>0.690</td>\n", | |
" <td>0.690</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.8</th>\n", | |
" <td>-3.973</td>\n", | |
" <td>-2.010</td>\n", | |
" <td>-1.210</td>\n", | |
" <td>-0.460</td>\n", | |
" <td>0.384</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.702</td>\n", | |
" <td>0.712</td>\n", | |
" <td>0.714</td>\n", | |
" <td>0.714</td>\n", | |
" <td>0.714</td>\n", | |
" <td>0.714</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.7</th>\n", | |
" <td>-3.932</td>\n", | |
" <td>-2.012</td>\n", | |
" <td>-1.224</td>\n", | |
" <td>-0.479</td>\n", | |
" <td>0.376</td>\n", | |
" <td>0.681</td>\n", | |
" <td>0.724</td>\n", | |
" <td>0.738</td>\n", | |
" <td>0.740</td>\n", | |
" <td>0.740</td>\n", | |
" <td>0.741</td>\n", | |
" <td>0.741</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.6</th>\n", | |
" <td>-3.889</td>\n", | |
" <td>-2.013</td>\n", | |
" <td>-1.238</td>\n", | |
" <td>-0.499</td>\n", | |
" <td>0.369</td>\n", | |
" <td>0.696</td>\n", | |
" <td>0.747</td>\n", | |
" <td>0.765</td>\n", | |
" <td>0.768</td>\n", | |
" <td>0.769</td>\n", | |
" <td>0.769</td>\n", | |
" <td>0.769</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.6</th>\n", | |
" <td>-0.769</td>\n", | |
" <td>-0.762</td>\n", | |
" <td>-0.747</td>\n", | |
" <td>-0.696</td>\n", | |
" <td>-0.369</td>\n", | |
" <td>0.499</td>\n", | |
" <td>1.238</td>\n", | |
" <td>2.267</td>\n", | |
" <td>3.071</td>\n", | |
" <td>3.889</td>\n", | |
" <td>4.718</td>\n", | |
" <td>6.672</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.7</th>\n", | |
" <td>-0.740</td>\n", | |
" <td>-0.736</td>\n", | |
" <td>-0.724</td>\n", | |
" <td>-0.681</td>\n", | |
" <td>-0.376</td>\n", | |
" <td>0.479</td>\n", | |
" <td>1.224</td>\n", | |
" <td>2.272</td>\n", | |
" <td>3.093</td>\n", | |
" <td>3.932</td>\n", | |
" <td>4.783</td>\n", | |
" <td>6.794</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.8</th>\n", | |
" <td>-0.714</td>\n", | |
" <td>-0.711</td>\n", | |
" <td>-0.702</td>\n", | |
" <td>-0.666</td>\n", | |
" <td>-0.384</td>\n", | |
" <td>0.460</td>\n", | |
" <td>1.210</td>\n", | |
" <td>2.275</td>\n", | |
" <td>3.114</td>\n", | |
" <td>3.973</td>\n", | |
" <td>4.847</td>\n", | |
" <td>6.915</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.9</th>\n", | |
" <td>-0.690</td>\n", | |
" <td>-0.688</td>\n", | |
" <td>-0.681</td>\n", | |
" <td>-0.651</td>\n", | |
" <td>-0.390</td>\n", | |
" <td>0.440</td>\n", | |
" <td>1.195</td>\n", | |
" <td>2.277</td>\n", | |
" <td>3.134</td>\n", | |
" <td>4.013</td>\n", | |
" <td>4.909</td>\n", | |
" <td>7.034</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3.0</th>\n", | |
" <td>-0.667</td>\n", | |
" <td>-0.665</td>\n", | |
" <td>-0.660</td>\n", | |
" <td>-0.636</td>\n", | |
" <td>-0.396</td>\n", | |
" <td>0.420</td>\n", | |
" <td>1.180</td>\n", | |
" <td>2.278</td>\n", | |
" <td>3.152</td>\n", | |
" <td>4.051</td>\n", | |
" <td>4.970</td>\n", | |
" <td>7.152</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>61 rows × 12 columns</p>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-728f0046-92cd-4039-88d1-e8f45316d881')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-728f0046-92cd-4039-88d1-e8f45316d881 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-728f0046-92cd-4039-88d1-e8f45316d881');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-f4b27d27-db46-4b5a-a1e1-4dd667602a82\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-f4b27d27-db46-4b5a-a1e1-4dd667602a82')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-f4b27d27-db46-4b5a-a1e1-4dd667602a82 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "t_pearson3_st", | |
"summary": "{\n \"name\": \"t_pearson3_st\",\n \"rows\": 61,\n \"fields\": [\n {\n \"column\": 0.99,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.112970082424314,\n \"min\": -4.051,\n \"max\": -0.667,\n \"num_unique_values\": 61,\n \"samples\": [\n -4.051,\n -3.845,\n -1.197\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.95,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.45460149185131654,\n \"min\": -2.013,\n \"max\": -0.665,\n \"num_unique_values\": 60,\n \"samples\": [\n -2.003,\n -2.011,\n -1.423\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.9,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.20790239408068603,\n \"min\": -1.341,\n \"max\": -0.66,\n \"num_unique_values\": 57,\n \"samples\": [\n -1.18,\n -1.25,\n -1.231\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.8,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.12235767241983643,\n \"min\": -0.857,\n \"max\": -0.42,\n \"num_unique_values\": 58,\n \"samples\": [\n -0.42,\n -0.518,\n -0.855\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.5,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.26062028572874624,\n \"min\": -0.396,\n \"max\": 0.396,\n \"num_unique_values\": 61,\n \"samples\": [\n 0.396,\n 0.36,\n -0.254\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.2,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.12235767241983642,\n \"min\": 0.42,\n \"max\": 0.857,\n \"num_unique_values\": 58,\n \"samples\": [\n 0.636,\n 0.711,\n 0.79\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.1,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.20790239408068603,\n \"min\": 0.66,\n \"max\": 1.341,\n \"num_unique_values\": 57,\n \"samples\": [\n 0.66,\n 0.771,\n 1.282\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.04,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.5413545932458829,\n \"min\": 0.666,\n \"max\": 2.278,\n \"num_unique_values\": 61,\n \"samples\": [\n 0.666,\n 0.793,\n 2.163\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.02,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.8216360069208583,\n \"min\": 0.666,\n \"max\": 3.152,\n \"num_unique_values\": 61,\n \"samples\": [\n 0.666,\n 0.798,\n 2.78\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.01,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.112970082424314,\n \"min\": 0.667,\n \"max\": 4.051,\n \"num_unique_values\": 61,\n \"samples\": [\n 0.667,\n 0.799,\n 3.388\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.005,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.4116809354057234,\n \"min\": 0.667,\n \"max\": 4.97,\n \"num_unique_values\": 61,\n \"samples\": [\n 0.667,\n 0.8,\n 3.99\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.001,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 2.123477490452634,\n \"min\": 0.667,\n \"max\": 7.152,\n \"num_unique_values\": 61,\n \"samples\": [\n 0.667,\n 0.8,\n 5.371\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 5 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# Dari buku Limantara hal. 107-109\n", | |
"# Tabel Distribsi log Pearson Tipe III Nilai G\n", | |
"# Untuk Cs Positif & Negatif\n", | |
"\n", | |
"# KODE: LM\n", | |
"\n", | |
"_DATA_LM = [\n", | |
" [-0.667, -0.665, -0.660, -0.636, -0.396, 0.420, 1.180, 2.278, 3.152, 4.061, 4.970],\n", | |
" [-0.690, -0.688, -0.681, -0.651, -0.390, 0.440, 1.196, 2.277, 3.134, 4.013, 4.909],\n", | |
" [-0.714, -0.711, -0.702, -0.666, -0.384, 0.460, 1.210, 2.275, 3.114, 3.973, 4.847],\n", | |
" [-0.740, -0.736, -0.724, -0.681, -0.376, 0.479, 1.224, 2.272, 3.097, 3.932, 4.783],\n", | |
" [-0.769, -0.762, -0.747, -0.695, -0.368, 0.499, 1.238, 2.267, 3.071, 3.889, 4.718],\n", | |
" [-0.799, -0.790, -0.771, -0.711, -0.360, 0.518, 1.250, 2.262, 3.048, 3.845, 4.652],\n", | |
" [-0.832, -0.819, -0.795, -0.725, -0.351, 0.537, 1.262, 2.256, 3.029, 3.800, 4.584],\n", | |
" [-0.867, -0.850, -0.819, -0.739, -0.341, 0.555, 1.274, 2.248, 2.997, 3.753, 4.515],\n", | |
" [-0.905, -0.882, -0.844, -0.752, -0.330, 0.574, 1.284, 2.240, 2.970, 3.705, 4.454],\n", | |
" [-0.946, -0.914, -0.869, -0.765, -0.319, 0.592, 1.294, 2.230, 2.942, 3.656, 4.372],\n", | |
" [-0.990, -0.949, -0.896, -0.777, -0.307, 0.609, 1.302, 2.219, 2.912, 3.605, 4.298],\n", | |
" [-1.037, -0.984, -0.920, -0.788, -0.294, 0.627, 1.310, 2.207, 2.881, 3.553, 4.223],\n", | |
" [-1.087, -1.020, -0.945, -0.799, -0.282, 0.643, 1.318, 2.193, 2.848, 3.499, 4.147],\n", | |
" [-1.140, -1.056, -0.970, -0.808, -0.268, 0.660, 1.324, 2.179, 2.815, 3.444, 4.069],\n", | |
" [-1.197, -1.093, -0.994, -0.817, -0.254, 0.675, 1.329, 2.163, 2.780, 3.388, 3.990],\n", | |
" [-1.256, -1.131, -1.018, -0.825, -0.240, 0.690, 1.333, 2.146, 2.745, 3.330, 3.910],\n", | |
" [-1.318, -1.163, -1.041, -0.832, -0.225, 0.705, 1.337, 2.128, 2.706, 3.271, 3.828],\n", | |
" [-1.388, -1.206, -1.064, -0.838, -0.210, 0.719, 1.339, 2.108, 2.666, 3.211, 3.745],\n", | |
" [-1.449, -1.243, -1.086, -0.844, -0.195, 0.732, 1.340, 2.087, 2.626, 3.149, 3.661],\n", | |
" [-1.518, -1.280, -1.107, -0.848, -0.180, 0.745, 1.341, 2.066, 2.585, 3.087, 3.575],\n", | |
" [-1.588, -1.317, -1.128, -0.852, -0.164, 0.758, 1.340, 2.043, 2.542, 3.022, 3.489],\n", | |
" [-1.660, -1.353, -1.147, -0.854, -0.148, 0.769, 1.339, 2.018, 2.498, 2.967, 3.401],\n", | |
" [-1.733, -1.388, -1.166, -0.856, -0.132, 0.780, 1.336, 1.993, 2.453, 2.891, 3.312],\n", | |
" [-1.806, -1.423, -1.183, -0.857, -0.116, 0.790, 1.333, 1.967, 2.407, 2.824, 3.223],\n", | |
" [-1.880, -1.458, -1.200, -0.857, -0.099, 0.800, 1.328, 1.939, 2.359, 2.755, 3.123],\n", | |
" [-1.965, -1.491, -1.216, -0.856, -0.083, 0.808, 1.323, 1.910, 2.311, 2.686, 3.041],\n", | |
" [-2.029, -1.524, -1.231, -0.855, -0.066, 0.816, 1.317, 1.880, 2.261, 2.615, 2.949],\n", | |
" [-2.104, -1.555, -1.245, -0.853, -0.050, 0.824, 1.309, 1.849, 2.211, 2.544, 2.856],\n", | |
" [-2.175, -1.586, -1.258, -0.850, -0.033, 0.830, 1.301, 1.818, 2.159, 2.472, 2.763],\n", | |
" [-2.225, -1.616, -1.270, -0.846, -0.017, 0.836, 1.292, 1.785, 2.107, 2.400, 2.670],\n", | |
" [-2.326, -1.645, -1.282, -0.842, 0.000, 0.842, 1.282, 1.751, 2.064, 2.064, 2.576],\n", | |
" [-2.400, -1.673, -1.292, -0.836, 0.017, 0.846, 1.270, 1.716, 2.000, 2.252, 2.482],\n", | |
" [-2.472, -1.700, -1.301, -0.830, 0.033, 0.850, 1.258, 1.680, 1.945, 2.178, 2.388],\n", | |
" [-2.544, -1.762, -1.309, -0.824, 0.050, 0.853, 1.245, 0.163, 1.890, 2.104, 2.294],\n", | |
" [-2.615, -1.750, -1.317, -0.816, 0.066, 0.855, 1.231, 1.606, 1.834, 2.029, 2.201],\n", | |
" [-2.686, -1.774, -1.323, -0.808, 0.083, 0.856, 1.216, 1.567, 1.777, 1.955, 2.108],\n", | |
" [-2.755, -1.797, -1.328, -0.800, 0.099, 0.857, 1.200, 1.528, 1.720, 1.880, 2.016],\n", | |
" [-2.824, -1.819, -1.333, -0.790, 0.116, 0.857, 1.183, 1.488, 1.633, 1.800, 1.936],\n", | |
" [-2.891, -1.839, -1.336, -0.780, 0.132, 0.856, 1.166, 1.484, 1.608, 1.733, 1.837],\n", | |
" [-2.957, -1.858, -1.339, -0.769, 0.148, 0.854, 1.147, 1.407, 1.549, 1.660, 1.749],\n", | |
" [-3.022, -1.877, -1.340, -0.758, 0.164, 0.852, 1.108, 1.366, 1.492, 1.588, 1.664],\n", | |
" [-3.087, -1.894, -1.341, -0.745, 0.180, 0.848, 1.107, 1.324, 1.435, 1.518, 1.581],\n", | |
" [-3.149, -1.910, -1.340, -0.732, 0.195, 0.844, 1.086, 1.282, 1.379, 1.449, 1.501],\n", | |
" [-3.211, -1.925, -1.339, -0.719, 0.210, 0.838, 1.064, 1.240, 1.324, 1.383, 1.424],\n", | |
" [-3.271, -1.938, -1.337, -0.705, 0.225, 0.832, 1.041, 1.196, 1.270, 1.316, 1.351],\n", | |
" [-3.330, -1.961, -1.333, -0.690, 0.240, 0.825, 1.018, 1.157, 1.217, 1.256, 1.282],\n", | |
" [-3.388, -1.962, -1.329, -0.675, 0.254, 0.817, 0.994, 1.116, 1.168, 1.197, 1.216],\n", | |
" [-3.444, -1.972, -1.324, -0.660, 0.268, 0.808, 0.970, 1.075, 1.116, 1.140, 1.155],\n", | |
" [-3.499, -1.981, -1.318, -0.643, 0.282, 0.799, 0.945, 1.035, 1.069, 1.087, 1.097],\n", | |
" [-3.533, -1.989, -1.310, -0.627, 0.294, 0.788, 0.920, 0.996, 1.023, 1.037, 1.044],\n", | |
" [-3.605, -1.996, -1.302, -0.609, 0.307, 0.777, 0.895, 0.969, 0.980, 0.990, 0.995],\n", | |
" [-3.656, -2.001, -1.294, -0.592, 0.319, 0.765, 0.869, 0.923, 0.939, 0.346, 0.949],\n", | |
" [-3.705, -2.006, -1.284, -0.574, 0.330, 0.732, 0.849, 0.888, 0.900, 0.905, 0.907],\n", | |
" [-3.753, -2.009, -1.274, -0.555, 0.341, 0.739, 0.819, 0.855, 0.864, 0.867, 0.869],\n", | |
" [-3.800, -2.011, -1.262, -0.537, 0.351, 0.725, 0.795, 0.823, 0.830, 0.832, 0.833],\n", | |
" [-3.845, -2.012, -1.250, -0.518, 0.360, 0.711, 0.771, 0.793, 0.796, 0.799, 0.800],\n", | |
" [-3.889, -2.013, -1.238, -0.499, 0.368, 0.696, 0.747, 0.764, 0.767, 0.769, 0.769],\n", | |
" [-3.932, -2.011, -1.224, -0.479, 0.376, 0.681, 0.724, 0.738, 0.740, 0.740, 0.741],\n", | |
" [-3.973, -2.010, -1.210, -0.460, 0.384, 0.666, 0.702, 0.712, 0.714, 0.734, 0.714],\n", | |
" [-4.013, -2.007, -1.195, -0.440, 0.330, 0.651, 0.681, 0.683, 0.689, 0.690, 0.690],\n", | |
" [-4.051, -2.003, -1.180, -0.420, 0.390, 0.636, 0.660, 0.666, 0.666, 0.667, 0.667]\n", | |
"]\n", | |
"\n", | |
"_INDEX_LM = np.arange(30, -31, -1) / 10\n", | |
"\n", | |
"_COL_LM = np.array([99, 95, 90, 80, 50, 20, 10, 4, 2, 1, 0.5])/100\n", | |
"\n", | |
"t_pearson3_lm = pd.DataFrame(data=_DATA_LM, index=_INDEX_LM, columns=_COL_LM)\n", | |
"t_pearson3_lm" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 424 | |
}, | |
"id": "U_c7AvslKw0O", | |
"outputId": "10e4c63b-d03b-4a32-bfe6-7f1be1d008b3" | |
}, | |
"execution_count": 6, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" 0.990 0.950 0.900 0.800 0.500 0.200 0.100 0.040 0.020 0.010 \\\n", | |
" 3.0 -0.667 -0.665 -0.660 -0.636 -0.396 0.420 1.180 2.278 3.152 4.061 \n", | |
" 2.9 -0.690 -0.688 -0.681 -0.651 -0.390 0.440 1.196 2.277 3.134 4.013 \n", | |
" 2.8 -0.714 -0.711 -0.702 -0.666 -0.384 0.460 1.210 2.275 3.114 3.973 \n", | |
" 2.7 -0.740 -0.736 -0.724 -0.681 -0.376 0.479 1.224 2.272 3.097 3.932 \n", | |
" 2.6 -0.769 -0.762 -0.747 -0.695 -0.368 0.499 1.238 2.267 3.071 3.889 \n", | |
"... ... ... ... ... ... ... ... ... ... ... \n", | |
"-2.6 -3.889 -2.013 -1.238 -0.499 0.368 0.696 0.747 0.764 0.767 0.769 \n", | |
"-2.7 -3.932 -2.011 -1.224 -0.479 0.376 0.681 0.724 0.738 0.740 0.740 \n", | |
"-2.8 -3.973 -2.010 -1.210 -0.460 0.384 0.666 0.702 0.712 0.714 0.734 \n", | |
"-2.9 -4.013 -2.007 -1.195 -0.440 0.330 0.651 0.681 0.683 0.689 0.690 \n", | |
"-3.0 -4.051 -2.003 -1.180 -0.420 0.390 0.636 0.660 0.666 0.666 0.667 \n", | |
"\n", | |
" 0.005 \n", | |
" 3.0 4.970 \n", | |
" 2.9 4.909 \n", | |
" 2.8 4.847 \n", | |
" 2.7 4.783 \n", | |
" 2.6 4.718 \n", | |
"... ... \n", | |
"-2.6 0.769 \n", | |
"-2.7 0.741 \n", | |
"-2.8 0.714 \n", | |
"-2.9 0.690 \n", | |
"-3.0 0.667 \n", | |
"\n", | |
"[61 rows x 11 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-dc4b4555-c4f1-41ab-ae0e-5e3860f36a55\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>0.990</th>\n", | |
" <th>0.950</th>\n", | |
" <th>0.900</th>\n", | |
" <th>0.800</th>\n", | |
" <th>0.500</th>\n", | |
" <th>0.200</th>\n", | |
" <th>0.100</th>\n", | |
" <th>0.040</th>\n", | |
" <th>0.020</th>\n", | |
" <th>0.010</th>\n", | |
" <th>0.005</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>3.0</th>\n", | |
" <td>-0.667</td>\n", | |
" <td>-0.665</td>\n", | |
" <td>-0.660</td>\n", | |
" <td>-0.636</td>\n", | |
" <td>-0.396</td>\n", | |
" <td>0.420</td>\n", | |
" <td>1.180</td>\n", | |
" <td>2.278</td>\n", | |
" <td>3.152</td>\n", | |
" <td>4.061</td>\n", | |
" <td>4.970</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.9</th>\n", | |
" <td>-0.690</td>\n", | |
" <td>-0.688</td>\n", | |
" <td>-0.681</td>\n", | |
" <td>-0.651</td>\n", | |
" <td>-0.390</td>\n", | |
" <td>0.440</td>\n", | |
" <td>1.196</td>\n", | |
" <td>2.277</td>\n", | |
" <td>3.134</td>\n", | |
" <td>4.013</td>\n", | |
" <td>4.909</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.8</th>\n", | |
" <td>-0.714</td>\n", | |
" <td>-0.711</td>\n", | |
" <td>-0.702</td>\n", | |
" <td>-0.666</td>\n", | |
" <td>-0.384</td>\n", | |
" <td>0.460</td>\n", | |
" <td>1.210</td>\n", | |
" <td>2.275</td>\n", | |
" <td>3.114</td>\n", | |
" <td>3.973</td>\n", | |
" <td>4.847</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.7</th>\n", | |
" <td>-0.740</td>\n", | |
" <td>-0.736</td>\n", | |
" <td>-0.724</td>\n", | |
" <td>-0.681</td>\n", | |
" <td>-0.376</td>\n", | |
" <td>0.479</td>\n", | |
" <td>1.224</td>\n", | |
" <td>2.272</td>\n", | |
" <td>3.097</td>\n", | |
" <td>3.932</td>\n", | |
" <td>4.783</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2.6</th>\n", | |
" <td>-0.769</td>\n", | |
" <td>-0.762</td>\n", | |
" <td>-0.747</td>\n", | |
" <td>-0.695</td>\n", | |
" <td>-0.368</td>\n", | |
" <td>0.499</td>\n", | |
" <td>1.238</td>\n", | |
" <td>2.267</td>\n", | |
" <td>3.071</td>\n", | |
" <td>3.889</td>\n", | |
" <td>4.718</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.6</th>\n", | |
" <td>-3.889</td>\n", | |
" <td>-2.013</td>\n", | |
" <td>-1.238</td>\n", | |
" <td>-0.499</td>\n", | |
" <td>0.368</td>\n", | |
" <td>0.696</td>\n", | |
" <td>0.747</td>\n", | |
" <td>0.764</td>\n", | |
" <td>0.767</td>\n", | |
" <td>0.769</td>\n", | |
" <td>0.769</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.7</th>\n", | |
" <td>-3.932</td>\n", | |
" <td>-2.011</td>\n", | |
" <td>-1.224</td>\n", | |
" <td>-0.479</td>\n", | |
" <td>0.376</td>\n", | |
" <td>0.681</td>\n", | |
" <td>0.724</td>\n", | |
" <td>0.738</td>\n", | |
" <td>0.740</td>\n", | |
" <td>0.740</td>\n", | |
" <td>0.741</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.8</th>\n", | |
" <td>-3.973</td>\n", | |
" <td>-2.010</td>\n", | |
" <td>-1.210</td>\n", | |
" <td>-0.460</td>\n", | |
" <td>0.384</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.702</td>\n", | |
" <td>0.712</td>\n", | |
" <td>0.714</td>\n", | |
" <td>0.734</td>\n", | |
" <td>0.714</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-2.9</th>\n", | |
" <td>-4.013</td>\n", | |
" <td>-2.007</td>\n", | |
" <td>-1.195</td>\n", | |
" <td>-0.440</td>\n", | |
" <td>0.330</td>\n", | |
" <td>0.651</td>\n", | |
" <td>0.681</td>\n", | |
" <td>0.683</td>\n", | |
" <td>0.689</td>\n", | |
" <td>0.690</td>\n", | |
" <td>0.690</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>-3.0</th>\n", | |
" <td>-4.051</td>\n", | |
" <td>-2.003</td>\n", | |
" <td>-1.180</td>\n", | |
" <td>-0.420</td>\n", | |
" <td>0.390</td>\n", | |
" <td>0.636</td>\n", | |
" <td>0.660</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.666</td>\n", | |
" <td>0.667</td>\n", | |
" <td>0.667</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>61 rows × 11 columns</p>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-dc4b4555-c4f1-41ab-ae0e-5e3860f36a55')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-dc4b4555-c4f1-41ab-ae0e-5e3860f36a55 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-dc4b4555-c4f1-41ab-ae0e-5e3860f36a55');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-cb217443-5754-4597-a446-ea8d49e3b8e6\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-cb217443-5754-4597-a446-ea8d49e3b8e6')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-cb217443-5754-4597-a446-ea8d49e3b8e6 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "t_pearson3_lm", | |
"summary": "{\n \"name\": \"t_pearson3_lm\",\n \"rows\": 61,\n \"fields\": [\n {\n \"column\": 0.99,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.1125060613821491,\n \"min\": -4.051,\n \"max\": -0.667,\n \"num_unique_values\": 61,\n \"samples\": [\n -0.667,\n -0.799,\n -3.388\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.95,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.45511782957582997,\n \"min\": -2.013,\n \"max\": -0.665,\n \"num_unique_values\": 60,\n \"samples\": [\n -0.665,\n -0.79,\n -1.797\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.9,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.20784187716059374,\n \"min\": -1.341,\n \"max\": -0.66,\n \"num_unique_values\": 58,\n \"samples\": [\n -0.66,\n -0.771,\n -1.317\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.8,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.12234961774255215,\n \"min\": -0.857,\n \"max\": -0.42,\n \"num_unique_values\": 58,\n \"samples\": [\n -0.636,\n -0.711,\n -0.79\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.5,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.25902537167119155,\n \"min\": -0.396,\n \"max\": 0.39,\n \"num_unique_values\": 60,\n \"samples\": [\n -0.396,\n -0.36,\n 0.099\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.2,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.12230905716454883,\n \"min\": 0.42,\n \"max\": 0.857,\n \"num_unique_values\": 57,\n \"samples\": [\n 0.42,\n 0.518,\n 0.842\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.1,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.20779010926460556,\n \"min\": 0.66,\n \"max\": 1.341,\n \"num_unique_values\": 58,\n \"samples\": [\n 1.18,\n 1.25,\n 1.183\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.04,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.5730711463664997,\n \"min\": 0.163,\n \"max\": 2.278,\n \"num_unique_values\": 61,\n \"samples\": [\n 2.278,\n 2.262,\n 1.116\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.02,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.8221133768353273,\n \"min\": 0.666,\n \"max\": 3.152,\n \"num_unique_values\": 61,\n \"samples\": [\n 3.152,\n 3.048,\n 1.168\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.01,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.12817931930289,\n \"min\": 0.346,\n \"max\": 4.061,\n \"num_unique_values\": 61,\n \"samples\": [\n 4.061,\n 3.845,\n 1.197\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 0.005,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.41175928419215,\n \"min\": 0.667,\n \"max\": 4.97,\n \"num_unique_values\": 61,\n \"samples\": [\n 4.97,\n 4.652,\n 1.216\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 6 | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"# KODE" | |
], | |
"metadata": { | |
"id": "E-UHw9cP2EVh" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# KODE FUNGSI INTERPOLASI DARI TABEL\n", | |
"\n", | |
"from scipy import interpolate\n", | |
"\n", | |
"def _func_interp_bivariate(df):\n", | |
" \"Membuat fungsi dari tabel untuk interpolasi bilinear\"\n", | |
" table = df[df.columns.sort_values()].sort_index().copy()\n", | |
"\n", | |
" x = table.index\n", | |
" y = table.columns\n", | |
" z = table.to_numpy()\n", | |
"\n", | |
" # penggunaan kx=1, ky=1 untuk interpolasi linear antara 2 titik\n", | |
" # tidak menggunakan (cubic) spline interpolation\n", | |
" return interpolate.RectBivariateSpline(x, y, z, kx=1, ky=1)\n", | |
"\n", | |
"def _as_value(x):\n", | |
" x = np.around(x, 4)\n", | |
" return x.flatten() if x.size > 1 else x.item()" | |
], | |
"metadata": { | |
"id": "MvMT8N8_5S08" | |
}, | |
"execution_count": 7, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"def find_K(prob, skew_log, source='scipy'):\n", | |
" \"Mencari nilai K berdasarkan probabilitas dan skewness logaritmik\"\n", | |
" prob = np.array(prob)\n", | |
"\n", | |
" if source.lower() == 'scipy':\n", | |
" #ref: https://github.com/hidrokit/hidrokit/discussions/156\n", | |
" return np.around(stats.pearson3.ppf(1-prob, skew_log), 4)\n", | |
" elif source.lower() == 'soetopo':\n", | |
" func_pearson3_st = _func_interp_bivariate(t_pearson3_st)\n", | |
" return _as_value(func_pearson3_st(skew_log, prob, grid=False))\n", | |
" elif source.lower() == 'soewarno':\n", | |
" func_pearson3_sw = _func_interp_bivariate(t_pearson3_sw)\n", | |
" return _as_value(func_pearson3_sw(skew_log, prob, grid=False))\n", | |
" elif source.lower() == 'limantara':\n", | |
" func_pearson3_lm = _func_interp_bivariate(t_pearson3_lm)\n", | |
" return _as_value(func_pearson3_lm(skew_log, prob, grid=False))\n", | |
"\n", | |
"def calc_x_lp3(x, return_period=[5], source='scipy', show_stat=False):\n", | |
" \"Menghitung besar X dengan kala ulang tertentu\"\n", | |
" y = np.log10(x)\n", | |
" y_mean = np.mean(y)\n", | |
" y_std = np.std(y, ddof=1)\n", | |
" y_skew = stats.skew(y, bias=False)\n", | |
"\n", | |
" prob = 1 / np.array(return_period)\n", | |
" k = find_K(prob, y_skew, source=source)\n", | |
"\n", | |
" if show_stat:\n", | |
" print(f'y_mean = {y_mean:.5f}')\n", | |
" print(f'y_std = {y_std:.5f}')\n", | |
" print(f'y_skew = {y_skew:.5f}')\n", | |
" print(f'k = {k}')\n", | |
"\n", | |
" val_y = y_mean + k * y_std\n", | |
" val_x = np.power(10, val_y)\n", | |
" return val_x\n", | |
"\n", | |
"def freq_logpearson3(\n", | |
" df, col=None,\n", | |
" return_period=[2, 5, 10, 20, 25, 50, 100], source='scipy', show_stat=False,\n", | |
" col_name='Log Pearson III', index_name='Kala Ulang'\n", | |
" ):\n", | |
"\n", | |
" col = df.columns[0] if col is None else col\n", | |
"\n", | |
" x = df[col].copy()\n", | |
"\n", | |
" arr = calc_x_lp3(\n", | |
" x, return_period=return_period, show_stat=show_stat,\n", | |
" source=source\n", | |
" )\n", | |
"\n", | |
" result = pd.DataFrame(\n", | |
" data=arr, index=return_period, columns=[col_name]\n", | |
" )\n", | |
"\n", | |
" result.index.name = index_name\n", | |
" return result" | |
], | |
"metadata": { | |
"id": "8qzu93dQNsoz" | |
}, | |
"execution_count": 8, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"dict_table_source = {\n", | |
" 'soewarno': t_pearson3_sw,\n", | |
" 'soetopo': t_pearson3_st,\n", | |
" 'limantara': t_pearson3_lm\n", | |
"}\n", | |
"\n", | |
"def _find_prob_in_table(k, skew_log, table):\n", | |
" func_table = _func_interp_bivariate(table)\n", | |
" y = table.columns\n", | |
" x = func_table(skew_log, y, grid=False)\n", | |
" func_prob = interpolate.interp1d(x, y, kind='linear')\n", | |
" return _as_value(func_prob(k))\n", | |
"\n", | |
"def _calc_prob_in_table(k, skew_log, source='soewarno'):\n", | |
" if source.lower() in dict_table_source.keys():\n", | |
" return 1 - _find_prob_in_table(\n", | |
" k, skew_log, dict_table_source[source.lower()]\n", | |
" )\n", | |
"\n", | |
"def calc_prob(k, skew_log, source='scipy'):\n", | |
" if source.lower() == 'scipy':\n", | |
" return stats.pearson3.cdf(k, skew_log)\n", | |
" if source.lower() in dict_table_source.keys():\n", | |
" return _calc_prob_in_table(k, skew_log, source.lower())" | |
], | |
"metadata": { | |
"id": "u_OKX7ssdoJZ" | |
}, | |
"execution_count": 9, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"# FUNGSI\n" | |
], | |
"metadata": { | |
"id": "lQtQYJJvn6Wb" | |
} | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"## Fungsi `find_K(prob, skew_log, ...)`\n", | |
"\n", | |
"Function: `find_K(prob, skew_log, source='scipy')`\n", | |
"\n", | |
"Fungsi `find_K(...)` digunakan untuk mencari nilai $K$ (frequency factor) dari berbagai sumber berdasarkan besar probabilitas dan kemencengan (_skew_) logaritmik data.\n", | |
"\n", | |
"- Argumen Posisi:\n", | |
" - `prob`: probabilitas $\\left( \\left( 0, 1 \\right) \\in \\mathbb{R} \\right)$\n", | |
" - `skew_log`: skewness logaritmik\n", | |
"- Argumen Opsional:\n", | |
" - `source`: sumber nilai K, `'scipy'` (default). Sumber yang dapat digunakan antara lain: Soewarno (`'soewarno'`), Soetopo (`'soetopo'`), Limantara (`'limantara'`)." | |
], | |
"metadata": { | |
"id": "2ztdqfqfwd9I" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"find_K(0.02, -2) # menggunakan nilai dari scipy" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "PtNOx3Rkugdn", | |
"outputId": "9a167dcf-273a-48e3-f994-4c2e65f0060d" | |
}, | |
"execution_count": 10, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"0.9798" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 10 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"find_K(0.02, -2, source='soewarno') # menggunakan tabel dari buku Soewarno" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "6oIVcGAousQs", | |
"outputId": "f4bc4d56-d5bb-42a8-b4c1-828fe39690d8" | |
}, | |
"execution_count": 11, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"0.98" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 11 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# perbandingan antara nilai tabel dan fungsi scipy\n", | |
"\n", | |
"source_test = ['scipy', 'soewarno', 'soetopo', 'limantara']\n", | |
"\n", | |
"prob = 1 / np.array([2, 5, 10, 20, 25, 50, 100]) # [0.5 , 0.2 , 0.1 , 0.05, 0.04, 0.02, 0.01]\n", | |
"print(f'prob = {prob}')\n", | |
"skew_log = -2.5\n", | |
"print(f'Nilai dari tabel (skew={skew_log})')\n", | |
"for _source in source_test:\n", | |
" print(f'K_{_source:<12}=', find_K(prob, skew_log, source=_source))\n", | |
"\n", | |
"skew_log = 1.75\n", | |
"print(f'Nilai hasil interpolasi (skew={skew_log})')\n", | |
"for _source in source_test:\n", | |
" print(f'K_{_source:<12}=', find_K(prob, skew_log, source=_source))" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "WZgSfnCzuIlg", | |
"outputId": "5b929d84-068e-4aab-dc32-42fe804ecac2" | |
}, | |
"execution_count": 12, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"prob = [0.5 0.2 0.1 0.05 0.04 0.02 0.01]\n", | |
"Nilai dari tabel (skew=-2.5)\n", | |
"K_scipy = [0.3599 0.7107 0.7706 0.7901 0.7931 0.7977 0.7992]\n", | |
"K_soewarno = [0.36 0.711 0.771 0.7893 0.793 0.798 0.799 ]\n", | |
"K_soetopo = [0.36 0.711 0.771 0.7893 0.793 0.798 0.799 ]\n", | |
"K_limantara = [0.36 0.711 0.771 0.7893 0.793 0.796 0.799 ]\n", | |
"Nilai hasil interpolasi (skew=1.75)\n", | |
"K_scipy = [-0.2748 0.6515 1.3208 1.9769 2.1862 2.8318 3.472 ]\n", | |
"K_soewarno = [-0.275 0.651 1.3207 2.0414 2.1855 2.831 3.4712]\n", | |
"K_soetopo = [-0.275 0.6515 1.321 2.0418 2.186 2.8315 3.4715]\n", | |
"K_limantara = [-0.275 0.6515 1.321 2.0418 2.186 2.8315 3.4715]\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"## Fungsi `calc_x_lp3(x, ...)`\n", | |
"\n", | |
"Function: `calc_x_lp3(x, return_period=[5], source='scipy', show_stat=False)`\n", | |
"\n", | |
"Fungsi `calc_x_lp3(...)` digunakan untuk mencari besar $X$ berdasarkan kala ulang (_return period_), yang hasilnya dalam bentuk `numpy.array`.\n", | |
"\n", | |
"- Argumen Posisi:\n", | |
" - `x`: _array_.\n", | |
"- Argumen Opsional:\n", | |
" - `return_period`: Kala Ulang (Tahun), `[5]` (default).\n", | |
" - `source`: sumber nilai K, `'scipy'` (default). Sumber yang dapat digunakan antara lain: Soewarno (`'soewarno'`), Soetopo (`'soetopo'`), Limantara (`'limantara'`).\n", | |
" - `show_stat`: Menampilkan parameter statistik, `False` (default)\n" | |
], | |
"metadata": { | |
"id": "f9HiOKEXwbU8" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"calc_x_lp3(data.hujan)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "LVmzrs3Mw8NG", | |
"outputId": "dc2674ac-4d3f-4c7d-b652-35832f101664" | |
}, | |
"execution_count": 13, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([114.75316488])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 13 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"calc_x_lp3(data.hujan, show_stat=True)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "WotAUN6TxgKo", | |
"outputId": "fb9c8396-74eb-44ff-8aa8-f537b87e472a" | |
}, | |
"execution_count": 14, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"y_mean = 1.96408\n", | |
"y_std = 0.11381\n", | |
"y_skew = -1.25646\n", | |
"k = [0.8408]\n" | |
] | |
}, | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([114.75316488])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 14 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"calc_x_lp3(data.hujan, return_period=[5, 10, 15, 20, 21], show_stat=True)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "_SATuzS0xYHx", | |
"outputId": "b2e592a0-34e8-45c9-c2e3-9077a575948b" | |
}, | |
"execution_count": 15, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"y_mean = 1.96408\n", | |
"y_std = 0.11381\n", | |
"y_skew = -1.25646\n", | |
"k = [0.8408 1.0738 1.1678 1.2221 1.2304]\n" | |
] | |
}, | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([114.75316488, 121.97804293, 125.02000217, 126.81166723,\n", | |
" 127.08778456])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 15 | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"## Fungsi `freq_logpearson3(df, ...)`\n", | |
"\n", | |
"Function: `freq_logpearson3(df, col=None, return_period=[2, 5, 10, 20, 25, 50, 100], source='scipy', show_stat=False, col_name='Log Pearson III')`\n", | |
"\n", | |
"Fungsi `freq_logpearson3(...)` merupakan fungsi kembangan lebih lanjut dari `calc_x_lp3(...)` yang menerima input `pandas.DataFrame` dan memiliki luaran berupa `pandas.DataFrame`.\n", | |
"\n", | |
"- Argumen Posisi:\n", | |
" - `df`: `pandas.DataFrame`.\n", | |
"- Argumen Opsional:\n", | |
" - `col`: nama kolom, `None` (default). Jika tidak diisi menggunakan kolom pertama dalam `df` sebagai data masukan.\n", | |
" - `return_period`: Kala Ulang (Tahun), `[2, 5, 10, 20, 25, 50, 100]` (default).\n", | |
" - `source`: sumber nilai K, `'scipy'` (default). Sumber yang dapat digunakan antara lain: Soewarno (`'soewarno'`), Soetopo (`'soetopo'`), Limantara (`'limantara'`).\n", | |
" - `show_stat`: Menampilkan parameter statistik, `False` (default).\n", | |
" - `col_name`: Nama kolom luaran, `Log Pearson III` (default)." | |
], | |
"metadata": { | |
"id": "9vGviiT-ykEJ" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"freq_logpearson3(data)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 300 | |
}, | |
"id": "VT1XlYmwzpZb", | |
"outputId": "65bf8d01-ccd4-417f-8631-098bd69ba1f3" | |
}, | |
"execution_count": 16, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" Log Pearson III\n", | |
"Kala Ulang \n", | |
"2 97.111291\n", | |
"5 114.753165\n", | |
"10 121.978043\n", | |
"20 126.811667\n", | |
"25 128.030417\n", | |
"50 131.065229\n", | |
"100 133.264423" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-0c649065-d0ae-4987-9901-47a3bb8380d2\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Log Pearson III</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>Kala Ulang</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>97.111291</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>114.753165</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>121.978043</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>126.811667</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>128.030417</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50</th>\n", | |
" <td>131.065229</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>100</th>\n", | |
" <td>133.264423</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-0c649065-d0ae-4987-9901-47a3bb8380d2')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-0c649065-d0ae-4987-9901-47a3bb8380d2 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-0c649065-d0ae-4987-9901-47a3bb8380d2');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-f376e126-e4df-4aa0-9d2b-500be67b913f\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-f376e126-e4df-4aa0-9d2b-500be67b913f')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-f376e126-e4df-4aa0-9d2b-500be67b913f button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"summary": "{\n \"name\": \"freq_logpearson3(data)\",\n \"rows\": 7,\n \"fields\": [\n {\n \"column\": \"Kala Ulang\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34,\n \"min\": 2,\n \"max\": 100,\n \"num_unique_values\": 7,\n \"samples\": [\n 2,\n 5,\n 50\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Log Pearson III\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 12.519383608866297,\n \"min\": 97.11129113430036,\n \"max\": 133.26442321638055,\n \"num_unique_values\": 7,\n \"samples\": [\n 97.11129113430036,\n 114.7531648831008,\n 131.06522908563142\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 16 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"freq_logpearson3(data, source='soewarno', col_name=f'LP3 (soewarno)')" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 300 | |
}, | |
"id": "vzuTz2dazv7J", | |
"outputId": "e7399b2e-632a-44f9-fc1a-07a48d50b8c6" | |
}, | |
"execution_count": 17, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" LP3 (soewarno)\n", | |
"Kala Ulang \n", | |
"2 97.103657\n", | |
"5 114.747151\n", | |
"10 121.962062\n", | |
"20 126.991242\n", | |
"25 128.020353\n", | |
"50 131.072098\n", | |
"100 133.281885" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-ce571a17-7537-4fd8-af0e-990ef0131395\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>LP3 (soewarno)</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>Kala Ulang</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>97.103657</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>114.747151</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>121.962062</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>126.991242</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>128.020353</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50</th>\n", | |
" <td>131.072098</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>100</th>\n", | |
" <td>133.281885</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-ce571a17-7537-4fd8-af0e-990ef0131395')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-ce571a17-7537-4fd8-af0e-990ef0131395 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-ce571a17-7537-4fd8-af0e-990ef0131395');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-a814b450-6d6e-48e2-83ba-1054e422bbf8\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-a814b450-6d6e-48e2-83ba-1054e422bbf8')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-a814b450-6d6e-48e2-83ba-1054e422bbf8 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"summary": "{\n \"name\": \"freq_logpearson3(data, source='soewarno', col_name=f'LP3 (soewarno)')\",\n \"rows\": 7,\n \"fields\": [\n {\n \"column\": \"Kala Ulang\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34,\n \"min\": 2,\n \"max\": 100,\n \"num_unique_values\": 7,\n \"samples\": [\n 2,\n 5,\n 50\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"LP3 (soewarno)\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 12.537130031443892,\n \"min\": 97.10365703356145,\n \"max\": 133.28188532377163,\n \"num_unique_values\": 7,\n \"samples\": [\n 97.10365703356145,\n 114.74715082995404,\n 131.07209839129794\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 17 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"freq_logpearson3(data, 'hujan', source='limantara', col_name=f'LP3 (limantara)', show_stat=True)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 370 | |
}, | |
"id": "yr1icugYz5Qz", | |
"outputId": "15c59f0d-6e14-4b26-e584-cef82ef65d77" | |
}, | |
"execution_count": 18, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"y_mean = 1.96408\n", | |
"y_std = 0.11381\n", | |
"y_skew = -1.25646\n", | |
"k = [0.2035 0.8406 1.0736 1.2275 1.2583 1.3479 1.4117]\n" | |
] | |
}, | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" LP3 (limantara)\n", | |
"Kala Ulang \n", | |
"2 97.103657\n", | |
"5 114.747151\n", | |
"10 121.971650\n", | |
"20 126.991242\n", | |
"25 128.020353\n", | |
"50 131.061795\n", | |
"100 133.271408" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-37eef699-84ce-49ac-9321-c431305fadc2\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>LP3 (limantara)</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>Kala Ulang</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>97.103657</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>114.747151</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>121.971650</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>126.991242</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>128.020353</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50</th>\n", | |
" <td>131.061795</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>100</th>\n", | |
" <td>133.271408</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-37eef699-84ce-49ac-9321-c431305fadc2')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-37eef699-84ce-49ac-9321-c431305fadc2 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-37eef699-84ce-49ac-9321-c431305fadc2');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-48b6c522-4360-4ff1-a9c6-b33383fd6a22\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-48b6c522-4360-4ff1-a9c6-b33383fd6a22')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-48b6c522-4360-4ff1-a9c6-b33383fd6a22 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"summary": "{\n \"name\": \"freq_logpearson3(data, 'hujan', source='limantara', col_name=f'LP3 (limantara)', show_stat=True)\",\n \"rows\": 7,\n \"fields\": [\n {\n \"column\": \"Kala Ulang\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34,\n \"min\": 2,\n \"max\": 100,\n \"num_unique_values\": 7,\n \"samples\": [\n 2,\n 5,\n 50\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"LP3 (limantara)\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 12.534295248814288,\n \"min\": 97.10365703356145,\n \"max\": 133.2714077847816,\n \"num_unique_values\": 7,\n \"samples\": [\n 97.10365703356145,\n 114.74715082995404,\n 131.06179456780336\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 18 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"_res = []\n", | |
"\n", | |
"for _s in ['scipy', 'soewarno', 'soetopo', 'limantara']:\n", | |
" _res += [freq_logpearson3(data, 'hujan', source=_s, col_name=f'LP3 ({_s})')]\n", | |
"\n", | |
"pd.concat(_res, axis=1)" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 300 | |
}, | |
"id": "a9Z2pHGGzn7b", | |
"outputId": "c6652c4e-8e52-46d2-e307-15522665070f" | |
}, | |
"execution_count": 19, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" LP3 (scipy) LP3 (soewarno) LP3 (soetopo) LP3 (limantara)\n", | |
"Kala Ulang \n", | |
"2 97.111291 97.103657 97.103657 97.103657\n", | |
"5 114.753165 114.747151 114.747151 114.747151\n", | |
"10 121.978043 121.962062 121.971650 121.971650\n", | |
"20 126.811667 126.991242 126.991242 126.991242\n", | |
"25 128.030417 128.020353 128.020353 128.020353\n", | |
"50 131.065229 131.072098 131.061795 131.061795\n", | |
"100 133.264423 133.281885 133.271408 133.271408" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-f6bda0df-6c40-4d82-8f1e-e93375a6fe1f\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>LP3 (scipy)</th>\n", | |
" <th>LP3 (soewarno)</th>\n", | |
" <th>LP3 (soetopo)</th>\n", | |
" <th>LP3 (limantara)</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>Kala Ulang</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>97.111291</td>\n", | |
" <td>97.103657</td>\n", | |
" <td>97.103657</td>\n", | |
" <td>97.103657</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>114.753165</td>\n", | |
" <td>114.747151</td>\n", | |
" <td>114.747151</td>\n", | |
" <td>114.747151</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>121.978043</td>\n", | |
" <td>121.962062</td>\n", | |
" <td>121.971650</td>\n", | |
" <td>121.971650</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>126.811667</td>\n", | |
" <td>126.991242</td>\n", | |
" <td>126.991242</td>\n", | |
" <td>126.991242</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>128.030417</td>\n", | |
" <td>128.020353</td>\n", | |
" <td>128.020353</td>\n", | |
" <td>128.020353</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50</th>\n", | |
" <td>131.065229</td>\n", | |
" <td>131.072098</td>\n", | |
" <td>131.061795</td>\n", | |
" <td>131.061795</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>100</th>\n", | |
" <td>133.264423</td>\n", | |
" <td>133.281885</td>\n", | |
" <td>133.271408</td>\n", | |
" <td>133.271408</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-f6bda0df-6c40-4d82-8f1e-e93375a6fe1f')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-f6bda0df-6c40-4d82-8f1e-e93375a6fe1f button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-f6bda0df-6c40-4d82-8f1e-e93375a6fe1f');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-3042d049-3a1b-4a4f-b641-b8fde80fc74f\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-3042d049-3a1b-4a4f-b641-b8fde80fc74f')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-3042d049-3a1b-4a4f-b641-b8fde80fc74f button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"summary": "{\n \"name\": \"pd\",\n \"rows\": 7,\n \"fields\": [\n {\n \"column\": \"Kala Ulang\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34,\n \"min\": 2,\n \"max\": 100,\n \"num_unique_values\": 7,\n \"samples\": [\n 2,\n 5,\n 50\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"LP3 (scipy)\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 12.519383608866297,\n \"min\": 97.11129113430036,\n \"max\": 133.26442321638055,\n \"num_unique_values\": 7,\n \"samples\": [\n 97.11129113430036,\n 114.7531648831008,\n 131.06522908563142\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"LP3 (soewarno)\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 12.537130031443892,\n \"min\": 97.10365703356145,\n \"max\": 133.28188532377163,\n \"num_unique_values\": 7,\n \"samples\": [\n 97.10365703356145,\n 114.74715082995404,\n 131.07209839129794\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"LP3 (soetopo)\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 12.534295248814288,\n \"min\": 97.10365703356145,\n \"max\": 133.2714077847816,\n \"num_unique_values\": 7,\n \"samples\": [\n 97.10365703356145,\n 114.74715082995404,\n 131.06179456780336\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"LP3 (limantara)\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 12.534295248814288,\n \"min\": 97.10365703356145,\n \"max\": 133.2714077847816,\n \"num_unique_values\": 7,\n \"samples\": [\n 97.10365703356145,\n 114.74715082995404,\n 131.06179456780336\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 19 | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"## Fungsi `calc_prob(k, skew_log, ...)`\n", | |
"\n", | |
"Function: `calc_prob(k, skew_log, source='scipy')`\n", | |
"\n", | |
"Fungsi `calc_prob(...)` digunakan untuk menghitung nilai probabilitas/peluang berdasarkan nilai $K$ (_frequency factor_).\n", | |
"\n", | |
"- Argumen Posisi:\n", | |
" - `k`: nilai $K$ (_frequency factor_). Nilai $K$ diperoleh menggunakan persamaan $K = \\frac{y-\\bar{y}}{s_y}$ dengan $y = log(x)$.\n", | |
" - `skew_log`: nilai _skewness_ logaritmik.\n", | |
"- Argumen Opsional:\n", | |
" - `source`: sumber nilai probabilitas. `'scipy'` (default). Sumber yang dapat digunakan antara lain: Soewarno (`'soewarno'`), Soetopo (`'soetopo'`), Limantara (`'limantara'`). Ketiga sumber lain menggunakan tabel, sehingga memiliki keterbatasan dalam memberi nilai probabilitas.\n", | |
"\n", | |
"Probabilitas/Peluang yang dikeluarkan oleh fungsi `calc_prob(...)` adalah $P'(X<)$ sehingga jika dilakukan perhitungan $K$ kembali, nilai masukan harus menggunakan formula $P(X) = 1-P'(X<)$." | |
], | |
"metadata": { | |
"id": "MdM3G-TqgQBu" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"_data = np.array([59.000, 67.750, 50.000, 72.500, 29.000, 30.550, 36.100, 64.500, 34.500, 125.500])\n", | |
"_y = np.sort(np.log10(_data))[::-1] #urut besar ke kecil\n", | |
"_y_mean = np.mean(_y)\n", | |
"_y_std = np.std(_y, ddof=1)\n", | |
"_y_skew = stats.skew(_y, bias=False)\n", | |
"\n", | |
"_k = (_y - _y_mean) / _y_std\n", | |
"_k" | |
], | |
"metadata": { | |
"id": "5A3LK1LKgS3A", | |
"outputId": "61aa0ff0-24f9-40ba-bf98-6f01d1f7ed88", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
} | |
}, | |
"execution_count": 20, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([ 1.91913743, 0.73872755, 0.59295708, 0.48720527, 0.29547275,\n", | |
" -0.06058346, -0.76129719, -0.85881912, -1.12039465, -1.23240566])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 20 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"calc_prob(_k, _y_skew, source='limantara')" | |
], | |
"metadata": { | |
"id": "xhso3lZOkwPY", | |
"outputId": "c17524c3-6b98-484a-fcd5-45c92edbe554", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
} | |
}, | |
"execution_count": 21, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([0.9607, 0.7761, 0.727 , 0.6913, 0.6266, 0.5065, 0.2365, 0.1992,\n", | |
" 0.1271, 0.0975])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 21 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"calc_prob(_k, _y_skew, source='soetopo')" | |
], | |
"metadata": { | |
"id": "35-5NFU0uDJL", | |
"outputId": "e4b6d1e7-5043-4906-bde3-dc6ff6d7a296", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
} | |
}, | |
"execution_count": 22, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([0.9607, 0.7761, 0.727 , 0.6913, 0.6267, 0.5066, 0.2368, 0.1994,\n", | |
" 0.1272, 0.0975])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 22 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"calc_prob(_k, _y_skew, source='scipy')" | |
], | |
"metadata": { | |
"id": "NMBqk0tYuHdu", | |
"outputId": "58e90b4c-9513-4c2b-ae00-aa5eedb99bf4", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
} | |
}, | |
"execution_count": 23, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"array([0.96095003, 0.78178546, 0.7409749 , 0.70849576, 0.64381381,\n", | |
" 0.50782301, 0.23212832, 0.19918497, 0.12334252, 0.09705203])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 23 | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"# Changelog\n", | |
"\n", | |
"```\n", | |
"- 20240413 - 1.3.0 / v0.5.0 - memperbaiki fungsi stats.pearson3.ppf (dengan scipy >= 1.12.0)\n", | |
"- 20220613 - 1.2.0 / v0.4.0 - ubah untuk perhitungan calc_prob (CDF) sehingga lebih sederhana dan tidak menggunakan negasi (tidak dipengaruhi skewness). Perlu diteliti lebih lanjut.\n", | |
"- 20220323 - 1.1.0 - tambah argumen index_name=\"Kala Ulang\" pada fungsi freq_gumbel() untuk penamaan index\n", | |
"- 20220315 - 1.0.3 - Tambah fungsi calc_prob(...)\n", | |
"- 20220310 - 1.0.2 - Fix show_stat default typo\n", | |
"- 20220309 - 1.0.1 - Typo\n", | |
"- 20220309 - 1.0.0 - Initial\n", | |
"```\n", | |
"\n", | |
"#### Copyright © 2022-2024 [Taruma Sakti Megariansyah](https://taruma.github.io)\n", | |
"\n", | |
"Source code in this notebook is licensed under a [MIT License](https://choosealicense.com/licenses/mit/). Data in this notebook is licensed under a [Creative Common Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/).\n" | |
], | |
"metadata": { | |
"id": "NDfe3t2q0P3_" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment