{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"geometric-distribution"},"result":{"entity_type":"calculator","id":"geometric-distribution","calculator_id":"geometric-distribution","canonical_url":"https://tttkmbb.com/statistics/geometric-distribution","name":"Geometric Distribution Calculator","title":"Geometric Distribution Calculator – Probability that the First Success Occurs on Trial k","category":"statistics","category_name":"Statistics & Probability","tool_name":"calculate_geometric_probability","featured_mcp_tool":false,"description":"Computes, for independent trials with success probability p, the probability that the first success occurs exactly on trial k, within the first k trials or later than trial k, plus the mean, variance, standard deviation and expected number of failures before the first success.","use_when":"You repeat independent attempts with the same success chance and ask how many attempts it takes until the first success (first six on a die, first defective item, first sale).","do_not_use_when":"The number of trials is fixed and you count successes (use binomial-distribution), or the waiting time is continuous (use exponential-distribution).","inputs":[{"name":"probability_of_success","label":"Probability of success (p)","type":"number","required":true,"max":1,"exclusive_min":0,"description":"Success probability on each trial, as a fraction between 0 and 1 (not a percentage).","example":0.1666667},{"name":"trial","label":"Trial number (k)","type":"integer","required":true,"min":1,"max":1000000,"description":"The trial on which the first success is of interest (k = 1 is the first attempt).","example":3}],"outputs":[{"name":"probability_exact","label":"P(X = k)","type":"number","decimals":6,"description":"First success exactly on trial k: (1 − p)^(k−1) · p."},{"name":"probability_at_most","label":"P(X ≤ k)","type":"number","decimals":6,"description":"First success within the first k trials: 1 − (1 − p)^k."},{"name":"probability_more_than","label":"P(X > k)","type":"number","decimals":6,"description":"No success in the first k trials: (1 − p)^k."},{"name":"mean","label":"Mean number of trials","type":"number","decimals":4,"description":"Expected trials until the first success: 1/p."},{"name":"variance","label":"Variance","type":"number","decimals":4,"description":"(1 − p)/p²."},{"name":"std_dev","label":"Standard deviation","type":"number","decimals":4,"description":"√(1 − p) / p."},{"name":"expected_failures","label":"Expected failures before success","type":"number","decimals":4,"description":"(1 − p)/p: mean of the alternative 'number of failures' form of the distribution."}],"input_schema":{"type":"object","properties":{"probability_of_success":{"description":"Success probability on each trial, as a fraction between 0 and 1 (not a percentage).","type":"number","maximum":1,"exclusiveMinimum":0,"examples":[0.1666667]},"trial":{"description":"The trial on which the first success is of interest (k = 1 is the first attempt).","type":"integer","minimum":1,"maximum":1000000,"examples":[3]}},"additionalProperties":false,"required":["probability_of_success","trial"]},"output_schema":{"type":"object","properties":{"probability_exact":{"description":"First success exactly on trial k: (1 − p)^(k−1) · p.","type":"number"},"probability_at_most":{"description":"First success within the first k trials: 1 − (1 − p)^k.","type":"number"},"probability_more_than":{"description":"No success in the first k trials: (1 − p)^k.","type":"number"},"mean":{"description":"Expected trials until the first success: 1/p.","type":"number"},"variance":{"description":"(1 − p)/p².","type":"number"},"std_dev":{"description":"√(1 − p) / p.","type":"number"},"expected_failures":{"description":"(1 − p)/p: mean of the alternative 'number of failures' form of the distribution.","type":"number"}}},"formula":"P(X = k) = (1 − p)^(k − 1) · p; P(X ≤ k) = 1 − (1 − p)^k; mean = 1/p; variance = (1 − p)/p²","method":"Uses the 'number of trials' convention (support k = 1, 2, …). The alternative convention counts failures before the first success (support 0, 1, …); its mean is (1 − p)/p, reported as expected_failures.","sources":[{"name":"Wikipedia – Geometric distribution","url":"https://en.wikipedia.org/wiki/Geometric_distribution","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wolfram MathWorld – Geometric Distribution","url":"https://mathworld.wolfram.com/GeometricDistribution.html","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"First six on the 3rd roll of a die (p = 1/6)","inputs":{"probability_of_success":0.1666667,"trial":3},"expected":{"probability_exact":0.115741,"probability_at_most":0.421296,"probability_more_than":0.578704,"mean":6,"variance":30,"std_dev":5.4772,"expected_failures":5},"url":"https://tttkmbb.com/api/v1/calculate/geometric-distribution?probability_of_success=0.1666667&trial=3"},{"name":"p = 0.2, first success on trial 5","inputs":{"probability_of_success":0.2,"trial":5},"expected":{"probability_exact":0.08192,"probability_at_most":0.67232,"probability_more_than":0.32768,"mean":5,"variance":20,"std_dev":4.4721},"url":"https://tttkmbb.com/api/v1/calculate/geometric-distribution?probability_of_success=0.2&trial=5"}],"faq":[{"q":"Which convention does this calculator use?","a":"k counts the trial of the first success (k ≥ 1). If your textbook counts failures before the first success, subtract 1 from k and use expected_failures for the mean."},{"q":"Is the geometric distribution memoryless?","a":"Yes: after any number of failures, the distribution of the remaining number of trials until success is unchanged. Past failures do not make a success 'due'."}],"tags":["geometric distribution","first success probability","number of trials until success","waiting time discrete"],"related":[{"calculator_id":"binomial-distribution","reason":"Number of successes in a fixed number of trials."},{"calculator_id":"exponential-distribution","reason":"Continuous-time analogue (memoryless waiting time)."}],"links":{"html":"https://tttkmbb.com/statistics/geometric-distribution","markdown":"https://tttkmbb.com/statistics/geometric-distribution.md","json":"https://tttkmbb.com/statistics/geometric-distribution.json","api":"https://tttkmbb.com/api/v1/calculate/geometric-distribution","schema":"https://tttkmbb.com/api/v1/calculators/geometric-distribution","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:59:33Z","next_actions":[{"tool":"run_calculator","calculator_id":"geometric-distribution","reason":"Run Geometric Distribution Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/statistics/geometric-distribution.md"}}