Mathematical path-advanced data analysis-interval estimation and hypothesis test (2)

Source: Internet
Author: User

A mall needs to set up VIP customers for a certain type of products and regularly push related advertisements to the customer. The customer service department recommends Customer, the database randomly extracts the consumption data of the first 4 quarters of 100 customer data (Here we use the average random number to simulate the data), and the average quarterly consumption of Customer A is RMB, check whether the consumption is in the upper-middle level (above the median)

> Sample (200:50000, 100)-> sale

> Sale

[1] 8447 13987 8809 44437 22973 28093 30594 28060 21101 45155 36128 30129

[13] 556 33977 9283 35094 903 32885 11639 1553329150 47368 4993 5376

[25] 1869 15975 25120 33530 31767 41845 39623 3586 22671 16128 14814

[37] 45830 10349 43989 3565045179 35282 27204 5485 22990 21475 1453342852

[49] 15986 28411 16683 1583227207 19062 10256 34549 46159 16315 43097

[61] 27758 14936 26161 1869425139 13208 26837 30171 13663 14082 46909 26498

[73] 7830 35810 15183 41769 8880 47928 13387 33231 28978 39486 6309 19344

[85] 12935 41976 13429 1629131159 33646 1742 48160 43169 40165 3891524941

[97] 25181 30077 19475 26836

>

> Binom. Test (sum (sale> 29900), length (sale), Al = "less ")

Exact binomial Test

Data: sum (Sale & gt; 29900) and length (sale)

Number of successes = 38, number of trials = 100, p-value = 0.01049

Alternative Hypothesis: True probability of success is less than 0.5

95 percent confidence interval:

0.0000000 0.4667535

Sample estimates:

Probability of success

0.38

>

P value = 0.01 <0.05, reject the original hypothesis,

95 percent confidence interval:

0.0000000 0.4667535

Less than 0.4667535, reject the original hypothesis,

All content of this blog is original, if reproduced please indicate the source http://blog.csdn.net/myhaspl/

The customer's consumption amount is higher than the customer's intermediate level of this type of goods, and is consumed in the middle and upper layers. You can consider setting it as a VIP customer. Two-item distribution detection is used here.

Mathematical path-advanced data analysis-interval estimation and hypothesis test (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.