Aggiunta una quasi totale analisi dei dati dinamici della molla 1. Ore di lavoro meritano il salvataggio.
This commit is contained in:
99
molla/compatibilita/comp2.ipynb
Normal file
99
molla/compatibilita/comp2.ipynb
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ba4e56bc",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Valori dinamici\n",
|
||||
"N = 10\n",
|
||||
"\n",
|
||||
"A = 3.21951 +- 0.00470 "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "aaf30c1f",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Valori statici\n",
|
||||
"N = 6\n",
|
||||
"\n",
|
||||
"A = 3.2002 +- 0.0092\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "b349ba73",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import numpy as np\n",
|
||||
"from scipy.stats import t as student_t"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"id": "a68eb302",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"t = 5.774\n",
|
||||
"p-value (two-tailed) = 0.0048 %\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Valori dimanici (sonar)\n",
|
||||
"Nd = 10\n",
|
||||
"Ad = 3.220\n",
|
||||
"uAd = 0.005\n",
|
||||
"\n",
|
||||
"#Valori statici (calibro)\n",
|
||||
"Ns = 6\n",
|
||||
"As = 3.200\n",
|
||||
"uAs = 0.009\n",
|
||||
"\n",
|
||||
"#Nomi coerenti con Cannelli\n",
|
||||
"GdL = Nd + Ns - 2\n",
|
||||
"\n",
|
||||
"s2 = ( (Nd - 1) * uAd**2 + (Ns - 1) * uAs**2 ) / GdL\n",
|
||||
"\n",
|
||||
"sigma2 = ( s2 / Nd ) + ( s2 / Ns )\n",
|
||||
"\n",
|
||||
"t = ( Ad - As ) / np.sqrt( sigma2 )\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"p_value = 2 * (1 - student_t.cdf(abs(t), df=GdL))\n",
|
||||
"print(f\"t = {t:.3f}\")\n",
|
||||
"print(f\"p-value (two-tailed) = {p_value * 100:.4f} %\")\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": ".venv",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.13.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
Reference in New Issue
Block a user