todaysummary.com's home » Microsoft »» Microsoft Excel

Fri, 23 May 2008 18:03:00 GMT, 2 comments.

Hi all,

I want to draw a random sample [with replacement] of size 10 (suppose

from a population having members : 1, 2, 3, and 4, where I assum

following:

Probability that 1 will be drawn is : 0.1

Probability that 2 will be drawn is : 0.4

Probability that 3 will be drawn is : 0.4

Probability that 4 will be drawn is : 0.1

Can anyone tell me that : is there any VBA function for doing that? I

no, how I can write my own function using VBA?

Thanks and Regards

--

Arun Kumar Saha

http://excel.todaysummary.com/wap_q_microsoft-excel_132232.html

tags: assum, draw, drawing, excel, members, microsoft, msdn, population, random, replacement, sample, size, software, suppose

- Arun Kumar Saha -
Here's a non-VBA solution, using nested IF functions and the cumulative

distribution:

Enter =RAND() into a cell, e.g., cell A1.

In another cell, e.g., B1, enter

=IF(A1<=0.1,1,IF(A1<=0.5,2,IF(A1<=0.9,3,4)))

Copy A1:B1 and paste into A2:B10. Press F9 to debug.

Or, download the tryout version of RiskSim from www.treeplan.com, and use

its RANDDISCRETE function.

- Mike Middleton

http://www.DecisionToolworks.com

Decision Analysis Add-ins for Excel

"Arun Kumar Saha" <Arun.Kumar.Saha.1961e27.excel.todaysummary.com.excelbanter.com> wrote in message

news:Arun.Kumar.Saha.1961e27.excel.todaysummary.com.excelbanter.com...

> Hi all,

> I want to draw a random sample [with replacement] of size 10 (suppose)

> from a population having members : 1, 2, 3, and 4, where I assume

> following:

> Probability that 1 will be drawn is : 0.1

> Probability that 2 will be drawn is : 0.4

> Probability that 3 will be drawn is : 0.4

> Probability that 4 will be drawn is : 0.1

> Can anyone tell me that : is there any VBA function for doing that? If

> no, how I can write my own function using VBA?

> Thanks and Regards,

>

>

> --

> Arun Kumar Saha

- Hello,
I suggest to take my UDF redw:

http://www.sulprobil.com/html/redw.html

Regards,

Bernd

- Drawing Revisions (aslo for Specifications)
- drawing rect function graph in excel
- Drawing on a chart
- drawing of lots
- drawing of lots
- Drawing Objects with vba & workbook/worksheet
- Drawing Objects with vba & workbook/worksheet
- Drawing Objects with duplicate names problem
- Drawing Objects with duplicate names problem
- drawing objects removed

- Email Servers Software
- Microsoft BizTalk Server
- Microsoft Certifications
- Microsoft Developer Network (MSDN)
- Microsoft Entourage
- Microsoft Excel
- Microsoft Exchange server
- Microsoft Frontpage
- Microsoft Game Technologies
- Microsoft IIS Development
- Microsoft Messanger (MSN)
- Microsoft MS DOS/95/98/me
- Microsoft Networking & security
- Microsoft Office
- Microsoft Office Miscellaneous
- Microsoft Outlook
- Microsoft Powerpoint
- Microsoft Server
- Microsoft SharePoint
- Microsoft Small Business Server (SBS)
- Microsoft Software & Solutions
- Microsoft Visio
- Microsoft Vista
- Microsoft Visual Basic
- Microsoft Visual C & C++
- Microsoft Visual C#
- Microsoft Visual Studio
- Microsoft Windows Media
- Microsoft Word
- Microsoft XP
- Win 2k/NT/2k3

©excel.todaysummary.com, All Rights Reserved. [31.25]