auton uuden akun kesto on eksponenttijakautunut autunut keskiarvolla 14000 km. millä todennöisyydellä uusi akku kestää yli 19 000 km? in matlab

main.m
mean_lifetime = 14000;
x = 19000;
prob_lifetime_greater_than_x = 1 - exp(-x/mean_lifetime);
92 chars
4 lines

This Matlab code calculates the probability of a new battery lasting more than 19,000 km given an exponentially distributed lifetime with a mean of 14,000 km.

related categories

gistlibby LogSnag