daily pastebin goal
62%
SHARE
TWEET

vertrauen ist wichtig

a guest Jul 3rd, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %% Vertrauensintervall
  2. clc; clear all;
  3.  
  4. % Variablen
  5. %x=[0.23,0.23,0.23,0.30,0.32,0.32,0.34,0.34,0.34 , 0.43,0.43,0.43,0.43,0.45,0.45,0.45,0.45,0.45 , 0.54,0.54,0.54,0.54,0.54,0.54,0.56,0.56,0.56, 0.62,0.65,0.65,0.65,0.67,0.67,0.68,0.76,0.76 ];
  6. %N = length(x);
  7. N = 18;
  8. % Irrtumswahrscheinlichkeit
  9. a = 0.1;
  10. % Vetrauensintervall (0.95 ändern)
  11. %a = 1 - 0.95;
  12. % Vetrauensintervall länge
  13. vl = 0.5;
  14.  
  15.  
  16. % Mittelwert & Standardabweichung
  17. %x_mean = mean(x)
  18. %x_std = std(x) % =s
  19. x_mean = 90;
  20. x_std = 1.2;
  21.  
  22. if x_std > 3
  23.     fprintf("Näherung durch Normalverteilung zulässig: %.1f > %.0f\n", x_std, 3)
  24.    
  25.     % Normalverteilung
  26.     disp ' '
  27.     disp '------------------------'
  28.     disp 'Normalverteilung Z-Raum'
  29.     disp '------------------------'
  30.     z_oben = norminv(1-a/2, 0, 1)
  31.     z_unten = x_mean - (z_oben * x_std) / sqrt(N)
  32.     z_oben = x_mean + (z_oben * x_std) / sqrt(N)
  33.  
  34. else
  35.     fprintf("Näherung durch Normalverteilung NICHT zulässig: %.1f < %.0f\n", x_std, 3)
  36.    
  37.     % Student-t
  38.     disp ' '
  39.     disp '------------------------'
  40.     disp 'Student-t'
  41.     disp '------------------------'
  42.     % Annahmebereich bestimmen
  43.     t_oben = tinv(1-a/2, N-1) % zweiseitiger Test
  44.     %t_oben = tinv(1-a, N-1) % einseitiger Test
  45.     t_unten = -t_oben;
  46.  
  47.     % Vertrauensintervall
  48.     x_unten = x_mean - (t_oben * x_std) / sqrt(N)
  49.     x_oben = x_mean + (t_oben * x_std) / sqrt(N)
  50. end
  51.  
  52. laenge = 4* x_std^2 / (0.5)^2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top