```{r nombre-opcional, opcion1=valor1, opcion2=valor2, ...}
# código R
```
This file contains hidden or 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
| def analizar_convergencia_tlc(distribuciones, n_max=1000, n_simulaciones=10000): | |
| """ | |
| Analizar la velocidad de convergencia al TLC para diferentes distribuciones | |
| """ | |
| resultados = {} | |
| for nombre, (dist_func, params) in distribuciones.items(): | |
| print(f"\nAnalizando: {nombre}") | |
| # Parámetros teóricos |
This file contains hidden or 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
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from scipy import stats | |
| import seaborn as sns | |
| def verificar_tlc(distribucion, params, tamano_muestra=10000, n_simulaciones=10000): | |
| """ | |
| Verificación empírica del Teorema del Límite Central | |
| Parámetros: |
This file contains hidden or 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
| regions = [ | |
| 'Africa Eastern and Southern', | |
| 'Africa Western and Central', | |
| 'Arab World', | |
| 'Central Europe and the Baltics', | |
| 'East Asia & Pacific', | |
| 'East Asia & Pacific (excluding high income)', | |
| 'East Asia & Pacific (IDA & IBRD countries)', | |
| 'Euro area', | |
| 'Europe & Central Asia', |
This file contains hidden or 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
| import plotly.express as px | |
| import pandas as pd | |
| import numpy as np | |
| from typing import Optional, List, Union | |
| def visualize_palette_colors_enhanced( | |
| palette_name: str = 'YlGnBu', | |
| palette_category: str = 'sequential', # 'sequential', 'qualitative', 'diverging', 'cyclical' | |
| show_values: bool = True, |
This file contains hidden or 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
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| def visualize_color_palette_simple(colors_plotly, title="Paleta de Colores"): | |
| """ | |
| Visualización simple y elegante de una paleta de colores | |
| """ | |
| # Convertir a formato Matplotlib | |
| colors_mpl = [] | |
| for color_str in colors_plotly: |
This file contains hidden or 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
| import plotly.express as px | |
| import pandas as pd | |
| import numpy as np | |
| # Definir función de visualización | |
| def visualize_palette_colors(palette_name='YlGnBu', show_values=True): | |
| """ | |
| Visualiza todos los colores de una paleta secuencial | |
| Parameters: |
from __future__ import annotations
from typing import List, Optional, Union
from math import nan
import jsonclass Estudiante:
"""Representa a un estudiante con nombre, edad y calificaciones."""
This file contains hidden or 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
| def bisection(f,a,b,N): | |
| '''Aproximacion de la solucion para f(x)=0 en el intervalo [a,b] | |
| por el metodo de Biseccion | |
| https://en.wikipedia.org/wiki/Bisection_method | |
| Parametros de entrada | |
| ---------- | |
| f : function | |
| La función para la cual estamos tratando de aproximar una solución f(x)=0. | |
| a,b : numeros reales | |
| El intervalo [a,b] es donde se busca la solucion. La funcion retorna |
NewerOlder