transform(deprecated)/split - Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : transform(deprecated)/split

stats[transform, split]

split one data list into several

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

stats[transform, split[n]](data)

transform[split[n]](data)

Parameters

n

-

positive integer

data

-

statistical list

Description

• 

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

• 

The function split of the subpackage stats[transform, ...] splits the data list, data, into n data lists of same weight.

• 

Missing items are taken into account.

• 

This function is useful in constructing histograms where each bar has the same area.

Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

withstats:

data1,2,3,4,5

data:=1,2,3,4,5

(1)

transform[split[3]]data

1,Weight2,23,Weight2,13,3,Weight4,13,Weight4,23,5

(2)

The following is an extended example where a list of numbers will be randomly generated, used in a histogram which will be compared to the theoretical distribution. Generate 300 numbers (reduce this number for faster results), randomly generated with a normal distribution

Numbersrandom[normald]300:

Sort the data.

Numbers_sortedtransform[statsort]Numbers:

Number of lists is set to 5 (increase it for a better resolution, but ensure there are enough points in the list).

N_list5:

Split into lists of equal weight.

Split_liststransform[split[N_list]]Numbers_sorted:

Obtain classes of equal weight from those lists. Make the total weight equal to 1.

Classesmapx→Weightdescribe[range]x,1N_list,Split_lists:

Construct histogram:

Histstatplots[histogram]Classes:

Create a theoretical curve

Theorplotstatevalfpdf,normald,describe[range]Numbers:

Display both the theoretical curve and the histogram.

plots[display]Hist,Theor

See Also

Statistics

statplots(deprecated)[histogram]

stats(deprecated)[data]

stats(deprecated)[transform]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam