Dear Experts,
Kindly , may I know buy using SPSS , how can I find the following probabilities for a given binomial random variable X with n = 25 and p =0.6? P(18<X<21). P(X≥12). P(18≤X≤21). Many thanks. Omar. --------------------------------- Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster. |
At 07:57 AM 12/1/2006, Omar Farook wrote:
> Kindly , may I know buy using SPSS , how can I find the following > probabilities for a given binomial random variable X with n = 25 and > p =0.6? > P(18<X<21). > P(X≥12). > P(18≤X≤21). Not sure what those last two are (what are characters ≥ and ≤?), but SPSS has functions for probabilities for the binomial distribution: PDF.BINOM and CDF.BINOM. By chance, I just ran up some code to create a binomial probability table, to check something from another posting. The following is SPSS draft output, 14.0.1: NEW FILE. INPUT PROGRAM. . NUMERIC N (F4) /P (F6.3) /K (F4) /P_K P_0$K P_K$N (PCT7.2). . VAR LABELS N 'Total number of questions' K 'Number of right answers' P 'Probability of answering a questioh right' P_K 'Probability of this # of right answers' P_0$K 'Probability of this many, or fewer' P_K$N 'Probability of at least this many' . LEAVE N K P. . COMPUTE N = 15. . COMPUTE P = 0.2. . LOOP K = 0 TO N. . COMPUTE P_K = PDF.BINOM(K,N,P). . COMPUTE P_0$K = CDF.BINOM(K,N,P). . COMPUTE P_K$N = P_K + (1 - P_0$K). * Kludge, because the SPSS 'PCT' formats are simply wrong: . * the number that displays as '20%' is 20, not 0.2. . . DO REPEAT PROB = P_K P_0$K P_K$N. . COMPUTE PROB=PROB*100. . END REPEAT. . END CASE. . END LOOP. END FILE. END INPUT PROGRAM. LIST. List |-----------------------------|---------------------------| |Output Created |30-NOV-2006 22:59:45 | |-----------------------------|---------------------------| N P K P_K P_0$K P_K$N 15 .200 0 3.52% 3.52% 100.00% 15 .200 1 13.19% 16.71% 96.48% 15 .200 2 23.09% 39.80% 83.29% 15 .200 3 25.01% 64.82% 60.20% 15 .200 4 18.76% 83.58% 35.18% 15 .200 5 10.32% 93.89% 16.42% 15 .200 6 4.30% 98.19% 6.11% 15 .200 7 1.38% 99.58% 1.81% 15 .200 8 .35% 99.92% .42% 15 .200 9 .07% 99.99% .08% 15 .200 10 .01% 100.00% .01% 15 .200 11 .00% 100.00% .00% 15 .200 12 .00% 100.00% .00% 15 .200 13 .00% 100.00% .00% 15 .200 14 .00% 100.00% .00% 15 .200 15 .00% 100.00% .00% Number of cases read: 16 Number of cases listed: 16 |
Free forum by Nabble | Edit this page |