Guest User

Untitled

a guest
Sep 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. from datetime import timedelta
  2. import pandas as pd
  3. import numpy as np
  4.  
  5. A = np.array([0,0,0,1,0,0,1,0,1,0,0,1,1,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0])
  6. B = np.array([0,0,1,1,0,0,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,0,1,1,1,1,0])
  7.  
  8. range = 100 minuts.
  9. λ_A = 4 per 100 mints.
  10. λ_B = 5 per 100 mints.
  11.  
  12. d = {'Rest_A':A, 'Rest_B':B}
  13. Time_Interval = pd.timedelta_range('11:00:00', periods=30, freq='10T')
  14. df = pd.DataFrame(d, Time_Interval)
  15.  
  16. period_one = poisson.pmf(0, λ_A/30) = 0.875173
  17. period_two = poisson.pmf(0, λ_A*2/30) = 0.765928
  18. period_three = poisson.pmf(0, λ_A*3/30) = 0.670320
  19.  
  20. period_four = P[X4 = 1| X3 = 0] = P[X4 = 1] = poisson.pmf(1, λ_A*4/30) = 0.312878
  21.  
  22. period_five = P[X5 = 0 | X4 = 1] = P[(X5 = 0) n (X4 = 1)] / P[X4 = 1] =
  23. P[X5 = 0] / P[X4 = 1] = poisson.pmf(1, λ_A*4/30) / poisson.pmf(0, λ_A*5/30)
  24. = 1.640950 ??
  25.  
  26. period_six = P[X6 = 1 | X5 = 0] =
  27. P[(X6 = 1) n (X5 = 0)] / P[X5 = 0] = P[X5 = 0] / P[X5 = 0] = 1 ???
  28.  
  29. P[X6 = 1 | X5 = 0, X4 = 1, X3 = 0, X2 = 0, X1 = 0] ??
Add Comment
Please, Sign In to add comment