Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Distrib Calculator

Distrib

Function: distrib (<expr>) Distributes sums over products. It differs from expand in that it works at only the top level of an expression, i.e., it doesnt recurse and it is faster than expand. It differs from multthru in that it expands all sums at that level.

load(distrib);
 n:10;
p:1/6;
versuche:1000 /* diese Anzahl sollte man variieren: 100,1000,10000,... die Ausführungsdauer steigt allerdings */;
anzahl_6:random_binomial(n,p,versuche);
load(descriptive);
gruppierung:discrete_freq(anzahl_6);
 X:gruppierung[1];
 H:gruppierung[2];
Verteilung: matrix( ["Anzahl der 6-er","Häufigkeit"],  [transpose(X),transpose(H)] );
plot2d([discrete, X, H]);
P:H/1000;
   emp:[discrete,X,P];
 plot2d(emp);
W(k):=binomial(n,k)*p**k*(1-p)**(n-k);
B:makelist(W(k),k,0,n);
 k:makelist(i,i,0,n);
liste:[discrete,k,B];
plot2d(liste);
plot2d(emp);

Examples:

          (%i1) distrib ((a+b) * (c+d));
          (%o1)                 b d + a d + b c + a c
          (%i2) multthru ((a+b) * (c+d));
          (%o2)                 (b + a) d + (b + a) c
          (%i3) distrib (1/((a+b) * (c+d)));
                                          1
          (%o3)                    ---------------
                                   (b + a) (d + c)
          (%i4) expand (1/((a+b) * (c+d)), 1, 0);
                                          1
          (%o4)                 ---------------------
                                b d + a d + b c + a c

There are also some inexact matches for distrib. Try ?? distrib to see them.

(%o1)                                true
(%i2) 

Distrib Example

Related Examples

distrib

distrib((x-1)*(x-2)*(...

Calculate

distrib-sumcontract

ux: (yi-yk) * ui + (y...

uy: (xk-xj) * ui + (x...

vx: (yi-yk) * vi + (y...

Calculate

distrib-multthru

f:(x1+x2)*(x2+x3)*(x3...

g:multthru(f);

h:distrib(g);

Calculate

distrib-load

load(distrib);

u:0;

sigma:1;

Calculate

distrib-load

load(distrib);

quantile_f(0.90,10,10);

Calculate

distrib-load-numer

load(distrib);

load(descriptive);

cdf_poisson(5,3),numer;

Calculate

distrib-load-numer

load(distrib);

load(descriptive);

cdf_poisson(5,3),numer;

Calculate

distrib-hypergeometric-load-numer

load(distrib);

load(descriptive);

1-cdf_hypergeometric(...

Calculate

distrib-load

load(distrib);

cdf_normal(1, 1, 1);

Calculate

distrib-load-log

load(distrib);

log(1-0.9)/log(0.078);

Calculate